
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.

Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics.
He now runs a conversational AI company – DheeYantra – focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.