From the course: Protecting Your Network with Open-Source Software

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Port forwarding

Port forwarding

- [Instructor] Let's try to connect to the web server on the Ubuntu host in the DMZ, from a Windows host through the Ubuntu router host. We'll be using the IP address of the external network interface of the Ubuntu router host to get to the web server. Let's go to the Windows host and open a web browser. Type the external IP of the Ubuntu router host, which is 192.168.70.128. Press Enter. You're unable to connect since port forwarding is not yet enabled. That's why we're getting this "can't reach this page" message. Let's now go back to our Ubuntu router host and change the firewall rules to enable port forwarding. Let's edit our firewall script. Type cd documents. Press Enter, type ls, press Enter. Do you see our firewall script, myfw.sh? Let's edit the script, type nano myfw.sh. Press Enter. These are the firewall rules we used to set up our Ubuntu router host initially. Let's add a couple of more rules to enable port forwarding. Type iptables -t space, nat, space, dash capital A…

Contents