centos6.5 firewall operation


service iptables status

 a) Take effect after restart
  On: chkconfig iptables on
  Off: chkconfig iptables off


  b) Immediately effective, invalid after restart
  Start: service iptables start
  Shutdown: service iptables stop


open port
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

ftp
pasv_enable=YES
pasv_min_port=10000
pasv_max_port=10010

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 10000:10010 -j ACCEPT

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8000:20000 -j ACCEPT


service iptables save
service iptables restart

Guess you like

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