CentOS open ports

1. Open port: /sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT

2. Save: /etc/rc.d/init.d/iptables save

3. Restart the firewall to make the configuration take effect: /etc/init.d/iptables restart

4. View open ports: /etc/init.d/iptables status

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325601701&siteId=291194637