DEV Community

Dbaport
Dbaport

Posted on

iptable any port enable

Login to your server and follow the below steps.
Step-1 : iptables-save > iptable.bak
Step-2 : vim iptable.bak
-> Press i and paste the below rule
-> A INPUT -p tcp -m state --state NEW -m tcp --dport -j ACCEPT
-> To paste the rule press Ctrl+Shift+V
-> Then press ESC and then enter :wq! and hit ENTER to save and exit
Step-3 : iptables-restore < iptable.bak
Step-4 : iptables-save
Step-5 : service iptables restart
Step-6 : iptables -L
Post doing the above steps, please check if you're able to access it now.

Top comments (0)