Open ports in Ubuntu’s firewall using IP Tables

On the terminal, do the following to open port 80

sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT

sudo iptables -F

Persisting the rule changes across boot cycles –

sudo iptables-save > /etc/iptables/rules.v4
sudo apt-get install iptables-persistent

iptables-persistent will look for the file “/etc/iptables/rules.v4” after boot up, to restore the rules for IPV4, thus automating the restore for each boot.

Leave a Reply

Your email address will not be published. Required fields are marked *


* Copy This Password *

* Type Or Paste Password Here *

67,683 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>