Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to delete an IP address that appears listed on the server's IPtable.

I'm using the following command to list the IPs:

iptables -L INPUT -n --line-numbers

Giving me a result like:

Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    acctboth   all  --  0.0.0.0/0            0.0.0.0/0           
2    DROP       all  --  xxx.xx.xx.xx         0.0.0.0/0 


Question:

How to delete or unblock the entry number two, listed as xxx.xx.xx.xx ?

share|improve this question
    
man iptables whould give you all answers you wish –  user61928 Sep 28 '12 at 5:57
add comment

1 Answer 1

up vote 3 down vote accepted

Look at the number on the left, then use number to delete it. For example delete line number 2, enter:

iptables -D INPUT 2
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.