1. 程式人生 > >【防火牆】iptables檢視、新增、刪除規則

【防火牆】iptables檢視、新增、刪除規則

[email protected]:~# iptables -t -nvL

檢視到當前我的埠對映下有很多規則。

1.刪除埠對映規則和埠對映的鏈

①先刪除子鏈裡的所有規則

iptables -t nat -F port_mapping

 

②再刪除這條鏈

iptables -t nat -X port_mapping

如果子鏈規則未刪除乾淨就刪除鏈 則當前的會提示錯誤如下: