/**/ /**/

3.05.2014

Delete IPtables Rule

. 3.05.2014

To list the rule list with numbers:

iptables -L  -n --line-numbers
 
[root@server ~]# iptables -L INPUT -n --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    DROP       tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:3306
2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:555
3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
[root@server ~]#
To delete a rule:
iptables -D  
 
[root@server ~]# iptables -D INPUT 1

Result:

[root@server ~]# iptables -L INPUT -n --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:555
2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
[root@server ~]#


Related Posts by Categories :



0 comments:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

 

MY BANNER

eddie
Racun dunia is proudly powered by Blogger.com | Template by o-om.com