Sunday, 11 December 2016

Allow/block ports in Linux/centos/redhat iptables

If you want to open port in firewall via command line

vi /etc/sysconfig/iptables and add below line

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

save and exit.

#service iptables restart

No comments:

Post a Comment

Install XRDP in Centos 7

rpm -Uvh yum update yum groupinstall "GNOME Desktop" ...