Hi guys!
I'm using FreeBSD 10.0 for a web host because in my opinion it has the best security options. For a few months I didn't have problems with them but since three days someone has been blocking the network with attack time "TCP Amplifier".
My actual security is based on:
When my system is under attack I have over 25,000 entries (tested with
Help me please.
I'm using FreeBSD 10.0 for a web host because in my opinion it has the best security options. For a few months I didn't have problems with them but since three days someone has been blocking the network with attack time "TCP Amplifier".
My actual security is based on:
Code:
IPF="ipfw -q add"
ipfw -q -f flush
ipfw add 1 allow tcp from any to any dst-port 53 in via xn0 setup limit src-addr 2
ipfw add 2 allow tcp from any to any dst-port 80 in via xn0 setup limit src-addr 2
#################################################
# Allow Loopback and Deny Loopback Spoofing
#################################################
$IPF allow all from any to any via lo0
$IPF deny all from any to 127.0.0.0/8
$IPF deny all from 127.0.0.0/8 to any
$IPF deny tcp from any to any frag
$IPF check-state
$IPF deny tcp from any to any established
$IPF allow all from any to any out keep-state
$IPF deny icmp from any to any
Code:
ext_if="xn0"
service_ports="{ 53, 80 }"
table <abusive_hosts> persist
# options
set block-policy drop
set loginterface $ext_if
set skip on lo
scrub on $ext_if reassemble tcp no-df random-id
antispoof quick for { lo0 $ext_if }
block in
pass out all keep state
pass out on $ext_if all modulate state
pass in quick from <trusted_hosts>
block in quick from <abusive_hosts>
pass in inet proto icmp all icmp-type echoreq
pass in on $ext_if proto tcp to <trused_hosts> port $service_ports flags S/SA keep state \
(max-src-conn-rate 15/1, overload <abusive_hosts> flush)
Code:
net.inet.tcp.syncookies=1
net.inet.ip.forwarding=1
net.inet.ip.fastforwarding=1
net.inet.tcp.nolocaltimewait=1
net.inet.tcp.syncache.rexmtlimit=1
net.inet.ip.check_interface=1
net.inet.ip.portrange.randomized=1
net.inet.ip.process_options=0
net.inet.ip.random_id=1
net.inet.ip.redirect=0
net.inet.ip.accept_sourceroute=0
net.inet.ip.sourceroute=0
net.inet.icmp.bmcastecho=0
net.inet.icmp.maskfake=0
net.inet.icmp.maskrepl=0
net.inet.icmp.log_redirect=0
net.inet.icmp.drop_redirect=1
net.inet.tcp.drop_synfin=1
net.inet.tcp.ecn.enable=1
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.icmp_may_rst=0
net.inet.tcp.maxtcptw=15000
net.inet.tcp.msl=5000
net.inet.tcp.path_mtu_discovery=0
net.inet.tcp.rfc3042=0
net.inet.udp.blackhole=1
net.inet.tcp.blackhole=2
net.inet.ip.rtexpire=60
net.inet.ip.rtminexpire=2
net.inet.ip.rtmaxcache=1024
kern.ipc.shmmax=134217728
When my system is under attack I have over 25,000 entries (tested with
pfctl -si).Help me please.