You can delete them based on what they're doing:
iptables -D INPUT -s 127.0.0.1 -p tcp --dport 111 -j ACCEPT
Or you can delete them based on their number and chain name:
iptables -D INPUT 4
You can delete them based on what they're doing:
iptables -D INPUT -s 127.0.0.1 -p tcp --dport 111 -j ACCEPT
Or you can delete them based on their number and chain name:
iptables -D INPUT 4
RSS feed for comments on this post
Copyright 2012 Major Hayden / Theme: R755 / This request brought to you by .
where do you find the chain number and name?
@ij:
The number is the row number of the item when you list them using:
iptables --list
ij: Try iptables -vnL --line-numbers
THANKS! saved me alot of time
Hi,
Thanks for sharing your knowledge. I wish you all the very best in all your endeavours.
By the way, I like your simplicity and versatalileness.
I am also a system admin but mostly jack of all master of none kinda thing.
warm regards,
Raghu
Thank you for the post.
I have a question, do you think it's possible to create a list where many IP addresses can be entered and the rule above checks the list or do I have to add each IP address individually.
I hope my question makes sense.
This is the best way to view chain numbers
iptables -L INPUT --line-numbers
you can also substitute with OUTPUT etc