linux下清空所有iptables規(guī)則
作者:陽(yáng)光
iptables 是與最新的 2.6.x 版本Linux 內(nèi)核集成的 IP 信息包過濾系統(tǒng)。我們?cè)谑褂胕ptables時(shí),有許多iptables垃圾規(guī)則不想要,如何清空iptables規(guī)則呢,答案就在正文中!
linux下清空iptables規(guī)則具體方法如下:
- 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
通過上本文的代碼,我們可以清楚的知道了linux下清空所有iptables規(guī)則的方法,希望對(duì)大家有所幫助!
【編輯推薦】
責(zé)任編輯:趙鵬
來源:
網(wǎng)絡(luò)轉(zhuǎn)載