It took a lot of time and digging to get my ipTables working fairly well.
Current status: 'Works' w/ a noticeable, reproducible (almost unacceptable) delay on SSH connections. This delay goes away as soon as ipTables is disabled. Please help, how can I fight off the long list of potential attacks, and also get my fast ssh back?
-A INPUT -i lo -j ACCEPT -A OUTPUT -o lo -j ACCEPT #DROP fragments (from a *different* tutorial, do I need this?) -A INPUT -f -j DROP #DROP NEW NOT SYN -A INPUT -p tcp ! --syn -m state --state NEW -j DROP #DROP SYN-FIN SCANS -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP #DROP SYN-RST SCANS -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP #DROP X-MAS SCANS -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j DROP #DROP NMAP FIN SCAN -A INPUT -p tcp --tcp-flags ALL FIN -j DROP #DROP NULL SCANS -A INPUT -p tcp --tcp-flags ALL NONE -j DROP #DROP ALL/ALL SCANS -A INPUT -p tcp --tcp-flags ALL ALL -j DROP -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT #non-standard ssh port matches ssh config -A INPUT -p tcp -m tcp --dport x1x0 -j ACCEPT -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT -A INPUT -j DROP
EDIT: I dug deeper and my ISP's nameservers and DNS look-up might be the problem:
Why would the SSH server be doing a DNS look-up, when I'm connecting as email@example.com?
and / or
Can I fix this (if DNS look-up is the cause) w/ an adjustment to the ssh config, instead of messing with having to find out the ip of the ISP's nameservers?