If you need to open up ports 80
and 443
, on file /etc/iptables/rules.v4
just add
-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT
directly below
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
And reboot OR run bellow
sudo /sbin/iptables-restore < /etc/iptables/rules.v4
Thanks for the suggestion @11k
See that some lines of the rules.v4
file are commented with # at the beginning
I am trying to open my port 2333. I have tried everything even flushing my IP table to make sure that nothing is being blocked.
I do have a service running on this port but somehow unable to open ports.
I do a have a backup of IP table rules. If someone could figure out why it's not working?