Skip to contentSkip to conversation

high load preformance firewall

DISCUSSION Dworf 1 participant 1 message Sep 28, 2002

lore
Share & tools
lore

Dworf

author
#0 lore raw

Hello,

I have a little problem with my firewall at the firm... The firm is a big target for users doing an syn flood. The firewall is connected to the ISP with an 155Mbit ATM connection. The ISP is doing an total deny on icmp on incomming connections so we get rid of ddos. So the only attacks comming to the server are syn floods. The servers behind the firewall are running some special made applications that need constant tcp connection to outside world to other firms. So when the synflood attack is comming in the connections drop after a while and the firewall runs out of resources. The firewall has an mrtg installed and it shows that it doesnt use up all of th 155Mbit only lets say 60% when there is an attack. And the system drops the active connections couse the timeout is expired of the tcl connection.

This is the syn protection i have:

----
iptables -N syn-flood
iptables -A INPUT -p tcp --syn -j syn-flood
iptables -A syn-flood -m limit --limit 2/s --limit-burst 4 -j RETURN iptables -A syn-flood -j DROP

iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
----

First the firewall droped after about 10minutes of attack then i added this settings....:
--
/bin/echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts /bin/echo "0" > /proc/sys/net/ipv4/conf/all/accept_source_route /bin/echo "0" > /proc/sys/net/ipv4/conf/all/accept_redirects /bin/echo "1" > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses /bin/echo "1" > /proc/sys/net/ipv4/conf/all/log_martians /bin/echo "0" > /proc/sys/net/ipv4/ip_forward

/bin/echo "2" > /proc/sys/net/ipv4/conf/all/rp_filter /bin/echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts /bin/echo "0" > /proc/sys/net/ipv4/tcp_timestamps /bin/echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout /bin/echo "1600" > /proc/sys/net/ipv4/tcp_keepalive_time /bin/echo "0" > /proc/sys/net/ipv4/tcp_window_scaling /bin/echo "0" > /proc/sys/net/ipv4/tcp_sack
--

after this it survives about 20 - 30minutes but not more.

Can someone help me a little more?!

Thank you

David