From e8f17c88331aa04245e4b28cdcf219be5ddd59ba Mon Sep 17 00:00:00 2001 From: shaofeng Date: Tue, 25 Apr 2023 23:48:48 +0800 Subject: [PATCH] update --- _pages/08-linux-iptables.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_pages/08-linux-iptables.md b/_pages/08-linux-iptables.md index 9bb112b..a2a0b9f 100644 --- a/_pages/08-linux-iptables.md +++ b/_pages/08-linux-iptables.md @@ -24,16 +24,16 @@ sfwu22@proj88:~$ sudo iptables -t nat -nvL --line-number ## Add/Insert Rules ```console # add rules to the end of a table -sfwu22@proj88:~$ sudo iptables -nvL --line-number +sfwu22@proj88:~$ sudo iptables -A INPUT -s 100.100.100.0/24 -j ACCEPT ... # insert rule into a table -sfwu22@proj88:~$ sudo iptables -t nat -nvL --line-number +sfwu22@proj88:~$ sudo iptables -I INPUT 2 -s 100.100.100.0/24 -j ACCEPT ``` ## Delete Rules ```console # delete rule number 1 from INPUT chain -sfwu22@proj88:~$ sudo iptables -D FORWARD 1 +sfwu22@proj88:~$ sudo iptables -D INPUT 1 # delete rule number 1 from nat table POSTROUTING chain sfwu22@proj88:~$ sudo iptables -t nat -D POSTROUTING 1