小樱 发表于 2013/11/11 16:39

linux下清空所有iptables 防火墙规则

将所有iptables以序号标记显示,执行:
iptables -L -n --line-numbers

清空命令
iptables -t nat -F
iptables -t nat -X
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -F
iptables -t mangle -X
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P INPUT ACCEPT
iptables -t mangle -P FORWARD ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -t mangle -P POSTROUTING ACCEPT
iptables -F
iptables -X
iptables -P FORWARD ACCEPT
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t raw -F
iptables -t raw -X
iptables -t raw -P PREROUTING ACCEPT
iptables -t raw -P OUTPUT ACCEPT
service iptables save


linux centos 7中关闭firewalld防火墙
https://bbs.itzmx.com/thread-91880-1-1.html

夏末诠释美 发表于 2013/11/11 16:51

发誓卜在发誓 发表于 2013/11/11 18:48

断情戒爱 发表于 2013/11/11 18:48

仅有旳姿态 发表于 2013/11/11 21:06

街角旳安静 发表于 2013/11/11 22:32

落寂 发表于 2013/11/12 00:34

思念吞噬一切 发表于 2013/11/12 02:27

解释等于掩饰 发表于 2013/11/12 04:37

崔二娘 发表于 2013/11/12 06:33

眼泪奢侈 发表于 2013/11/12 08:17

沉醉在眼中 发表于 2013/11/12 10:02

情人劫 发表于 2013/11/12 11:46

伪装幸福 发表于 2013/11/12 13:25

生活如此多喵 发表于 2013/11/12 13:49

学过已忘干 只记得iptables -L

没呼吸旳男人 发表于 2013/11/12 18:53

居高领下 发表于 2013/11/12 21:37

大男子主义 发表于 2013/11/12 23:40

我不够爱你吗 发表于 2013/11/13 01:08

意料中旳結果 发表于 2013/11/13 03:44

你依我侬 发表于 2013/11/13 05:38

悲伤式沉默 发表于 2013/11/13 07:30

你给的爱 发表于 2013/11/13 09:21

对抗心痛 发表于 2013/11/13 18:53

小樱 发表于 2013/11/13 19:16

生活如此多喵 发表于 2013/11/12 13:49
学过已忘干 只记得iptables -L

用了iptables -L删了一个。。。然后ssh都上不去了。。。直接重装系统。

精虫上脑 发表于 2013/11/14 01:48

一切皆是命 发表于 2013/11/14 04:00

寂寞才说爱 发表于 2013/11/14 06:14

搜狗搜出了你 发表于 2013/11/14 08:03

花事了 发表于 2013/11/14 09:28

页: [1] 2
查看完整版本: linux下清空所有iptables 防火墙规则