LINUX open network port command that allows external access

/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT #Open port 8000

/etc/rc.d/init.d/iptables save #Save configuration

/etc/rc.d/init.d/iptables restart #Restart the service to

see if the port is open

/etc/init.d/iptables status

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326688787&siteId=291194637