Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 501 Bytes

iptables.md

File metadata and controls

49 lines (30 loc) · 501 Bytes

iptables

Linux防火墙

查看

# iptables -L

开启与关闭

重启系统生效

开启

# chkconfig iptables on

关闭

# chkconfig iptables off

即时生效,重启后失效

开启

# service iptables start

关闭

# service iptables stop

配置文件

/etc/sysconfig/iptables

添加端口

iptables -A INPUT -p tcp -m tcp --dport 3001 -j ACCEPT

service iptables restart