Skip to content

Instantly share code, notes, and snippets.

@lomocc
Last active July 27, 2018 07:58
Show Gist options
  • Save lomocc/5425876b5f0e2a320784e949c4d3b383 to your computer and use it in GitHub Desktop.
Save lomocc/5425876b5f0e2a320784e949c4d3b383 to your computer and use it in GitHub Desktop.
linux

开启端口

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

关闭端口

iptables -I INPUT -p tcp --dport 80 -j DROP

查看配置文件

cat /etc/sysconfig/iptables

保存设置

service iptables save
@lomocc
Copy link
Author

lomocc commented Jan 8, 2017

123

@lomocc
Copy link
Author

lomocc commented Jan 8, 2017

456

@lomocc
Copy link
Author

lomocc commented Jan 8, 2017

789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment