Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to configure iptables for ubuntu 10.04 and I have a problem with iptables -L lagging on rows where the destination or source address is not localhost or anywhere. The following entries will cause lag on their row:

iptables -A INPUT -p tcp --dport 111 -s -j ACCEPT
iptables -A INPUT -p tcp --dport 90 -d -j ACCEPT

while this does not:

iptables -A INPUT -p tcp --dport localhost -s -j ACCEPT
iptables -A INPUT -p tcp --dport localhost -d -j ACCEPT

I feel like this might be due to iptables checking to see if the ip is reachable. If not, what is the cause, if it is how can I disable it?

share|improve this question
up vote 2 down vote accepted

Firstly, --dport localhost doesn't seem right; 'localhost' is an address, not a port specifier.

However, delays during iptables output are generally due to address resolution. iptables is trying to query the name for the IP address that it prints out, and this may take some time, especially where there's no match. You can avoid this by giving the -n flag to iptables:

iptables -Lvn
share|improve this answer

Your Answer


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.