DDOS Attack prevention on Linux server.
It will show you count.
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
Get output to file.
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | grep "." > test123
Install and configure APF firewall.
wget http://www.rfxn.com/downloads/apf-current.tar.gz
tar xzvf apf-current.tar.gz
Add IP list to deny file.
cat test123 >> /etc/apf/deny_hosts.rules
Save the list.
/etc/apf/apf -r
Restart the firewall
/etc/init.d/apf restart
Stopping APF: [ OK ]
Starting APF: [ OK ]
OR
Solution I am Using.
USE THIRD PARTY SERVICE. Move your DNS to this.
i.e. http://cloudflare.com/
Cloud Flare is blocking exact threats which is HITING to website.
There is many fetures, please check the site.
It will show you count.
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
Get output to file.
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | grep "." > test123
Install and configure APF firewall.
wget http://www.rfxn.com/downloads/apf-current.tar.gz
tar xzvf apf-current.tar.gz
Add IP list to deny file.
cat test123 >> /etc/apf/deny_hosts.rules
Save the list.
/etc/apf/apf -r
Restart the firewall
/etc/init.d/apf restart
Stopping APF: [ OK ]
Starting APF: [ OK ]
OR
Solution I am Using.
USE THIRD PARTY SERVICE. Move your DNS to this.
i.e. http://cloudflare.com/
Cloud Flare is blocking exact threats which is HITING to website.
There is many fetures, please check the site.