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 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 192.168.1.14 -j ACCEPT
iptables -A INPUT -p tcp --dport 90 -d 192.168.1.14 -j ACCEPT

while this does not:

iptables -A INPUT -p tcp --dport localhost -s 192.168.1.14 -j ACCEPT
iptables -A INPUT -p tcp --dport localhost -d 192.168.1.14 -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
add comment

1 Answer

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
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.