You have a web server running on port 8888 in a Linux comput

You have a web server running on port 8888 in a Linux computer, but without any firewall rules in place for protection.
Now, you want to use iptables to protect the website so that only computers from address 172.90.0.0/16 but excluding 172.90.255.0/24 can access the web server.


Show the commands of iptables that add the Linux firewall rules to enforce the protection.

Solution

iptables -A INPUT -s 172.90.0.0/16 -j ACCEPT

iptables -A INPUT -p TCP --dport 8888 -j ACCEPT

You have a web server running on port 8888 in a Linux computer, but without any firewall rules in place for protection. Now, you want to use iptables to protect

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site