How to Check and Disable Linux Firewall (iptables)
linux iptablesdisable firewallcheck firewall statusstop iptablespermanent firewall disable
Published·Modified·
Recently, while configuring Shadowsocks for multiple users, some users reported that certain accounts could not connect. After logging in via SSH, it was found that the corresponding ports were not allowed in the Linux firewall (iptables). The simplest and most direct solution is to disable the firewall directly (depending on the VPS configuration). Since this issue occurred, a simple record is made here for reference.

Temporarily Disable the Firewall Completely (No Reboot Required)
/etc/init.d/iptables status ## Check firewall status
/etc/init.d/iptables stop ## Disable firewall for this session
/etc/init.d/iptables restart ## Restart firewall
Permanently Disable the Firewall
# chkconfig --level 35 iptables off ## Note: use two hyphens; requires reboot