IP Tables slows network response times
Hello all.
I have spent rather a lot of time trying to find an answer for this one.
I have a Slackware Linux box, 2.4.29 kernel running IP Tables. I have the bare number of needed modules compiled into the custom kernel.
I start IP Tables using the following batch file:
iptables -P INPUT DROP
iptables -A INPUT -p tcp --destination-port 22 -j ACCEPT iptables -A INPUT -p tcp --destination-port 25 -j ACCEPT iptables -A INPUT -p tcp --destination-port 53 -j ACCEPT iptables -A INPUT -p udp --destination-port 53 -j ACCEPT iptables -A INPUT -p tcp --destination-port 80 -j ACCEPT iptables -A INPUT -p tcp --destination-port 110 -j ACCEPT iptables -A INPUT -p tcp --destination-port 443 -j ACCEPT
This works except it makes webpages and email served from this box SLOW to respond. (Several seconds).
Any ideas please? Questions welcomed.
Michael Hallager
networkStuff ltd
www.networkstuff.co.nz | p.09.839.1000 | m.029.638.7883
Quoted 10 lines · Michael Hallager
Hello all.
I have spent rather a lot of time trying to find an answer for this one.
I have a Slackware Linux box, 2.4.29 kernel running IP Tables. I have the bare number of needed modules compiled into the custom kernel.
This works except it makes webpages and email served from this box SLOW to respond. (Several seconds).
several seconds ? looks like you've got a timeout problem on name resolution (or another network access). Please ensure that DNS or name resolution traffic is not blocked.
More over, add a rule to accept loopback traffic on INPUT, blocked loopback traffic could explain problem you have.
Hope this help,
Signature · 2 lines
Eric Leblond <[email protected]> INL
Hi Eric.
Don't think so, I fixed the reverse DNS issue earlier:
root@202-150-101-225:/usr/local/Dialect/PaymentClient/config# nslookup 202.150.101.225 Server: 202.150.101.225 Address: 202.150.101.225#53
225.101.150.202.in-addr.arpa name = 202-150-101-225.networkstuff.net.nz.
root@202-150-101-225:/usr/local/Dialect/PaymentClient/config#
This machine runs its own DNS server.
Quoted 5 lines
several seconds ? looks like you've got a timeout problem on name resolution (or another network access). Please ensure that DNS or name resolution traffic is not blocked.
More over, add a rule to accept loopback traffic on INPUT, blocked loopback traffic could explain problem you have.
Could you please provide a sample of this rule?
Signature · 3 lines
Michael Hallager networkStuff ltd www.networkstuff.co.nz | p.09.839.1000 | m.029.638.7883
I've not run in to or heard of this problem my self before. But I suspect that there is a support protocol being used that we are aware of. How knows you may have a few things configured to use the Ident (Auth) protocol to find out the name of the user on the system that is requesting the web pages from. If this is indeed the case and you do not have a statefull packet inspection allowing returning outbound traffic back in you may be dropping some returning traffic that is sent out from a high port. In either case I would add the following rules to the end of your list to help diagnose this problem.
iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT iptables -A INPUT -p tcp -j LOG
The second rule is probably the most important as it will log the traffic that is getting dropped and thus you will have an idea what you need to modify your firewall to allow in.
Grant. . . .
Quoted 24 lines · Michael Hallager
Hello all.
I have spent rather a lot of time trying to find an answer for this one.
I have a Slackware Linux box, 2.4.29 kernel running IP Tables. I have the bare number of needed modules compiled into the custom kernel.
I start IP Tables using the following batch file:
iptables -P INPUT DROP
iptables -A INPUT -p tcp --destination-port 22 -j ACCEPT iptables -A INPUT -p tcp --destination-port 25 -j ACCEPT iptables -A INPUT -p tcp --destination-port 53 -j ACCEPT iptables -A INPUT -p udp --destination-port 53 -j ACCEPT iptables -A INPUT -p tcp --destination-port 80 -j ACCEPT iptables -A INPUT -p tcp --destination-port 110 -j ACCEPT iptables -A INPUT -p tcp --destination-port 443 -j ACCEPTThis works except it makes webpages and email served from this box SLOW to respond. (Several seconds).
Any ideas please? Questions welcomed.
Michael Hallager
networkStuff ltd
www.networkstuff.co.nz | p.09.839.1000 | m.029.638.7883
Quoted 4 lines
iptables -P INPUT DROP
iptables -A INPUT -p tcp --destination-port 53 -j ACCEPT iptables -A INPUT -p udp --destination-port 53 -j ACCEPT
"Think before you rule."
If your NAMED makes a query to the outside world, its _DEFAULT configuration will NOT use_ 53 as source port, so --destination-port 53 cannot match.
(Use -m state --state ESTABLISHED)