From the course: Protecting Your Network with Open Source Software
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Changing Netfilter settings
From the course: Protecting Your Network with Open Source Software
Changing Netfilter settings
- Next, we'll change the Netfilter rules on our Ubuntu router host to finish our configuration for forwarding packets between the internet and the Ubuntu local host. We'll use a shell script instead of typing individual commands. I keep my shell script in the documents folder type cd Documents, press Enter. Type ls, press Enter. The myfw.sh file is our shell script. Let's open the shell script by typing nano space myfw.sh, press Enter. The rules you are seeing here are the default Netfilter ones, introduced in our host firewall lesson. I added a couple of more rules to the input chain to prevent losing my remote desktop and secure shell connections. - p tcp, specifies the transmission control protocol or tcp used by a remote desktop or secure shell request. - s 04/0 indicates the scope of the source IPs, which covers all the possible incoming IP addresses. - d 04/0 is the same, except for it's for destination IPs.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Netfilter and iptables3m
-
Setting up a host firewall using iptables5m 24s
-
Automating Netfilter configuration5m 17s
-
Understanding hosts as routers2m 30s
-
Adding a network adapter3m 49s
-
Testing the second adapter2m 20s
-
Setting up IP forwarding3m 55s
-
Changing Netfilter settings6m 37s
-
Testing the router1m 21s
-
-
-
-
-
-