Publish: 2015-09-17 | Modify: 2015-09-17
Recently, when configuring multiple users for ss, some users reported that some accounts could not be used. After checking through ssh, it was found that it was because the corresponding ports were not allowed in the Linux firewall (iptables). The simplest way is to directly disable the firewall (depending on the VPS situation). Since encountering such a situation, I will make a simple record for reference.
Temporary complete shutdown of the firewall without restarting the machine:
/etc/init.d/iptables status ## Check the firewall status
/etc/init.d/iptables stop ## Disable the firewall for this session
/etc/init.d/iptables restart ## Restart the firewall
Permanent shutdown of the firewall:
chkconfig --level 35 iptables off ## Note that there are two hyphens in the middle; restart
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.