DDOS and SYN Blocking
🌐 Translated from Türkçe
06ozan06
Kayıtlı Üye
27.05.2013 19:18
1
We are installing inetbase on our Linux server in order to prevent SYN and DDOS attacks, which cannot be 100% solved.
After logging in as Root via Putty SSH:
wget http://www.inetbase.com/scripts/ddos/install.sh
Let's write.
Behind
sh install.sh
Let's type and start the installation.
Editing conf file:
pico /usr/local/ddos/ddos.conf
Let's open the file by typing .
* If the pico command fails, try the nano command, which does the same thing.
APF_BAN=0 If this feature is 1, it bans with APF, if 0 it bans with iptables (If we do not know APF, it is useful to keep it at 0).
NO_OF_CONNECTIONS=150 >Specifies the maximum number of connections that can be made over an IP.
BAN_PERIOD=600 > This value indicates the time in seconds, 600 seconds given in the example equals 10 minutes, if more than 600 connections are made within 10 minutes, the IP will be banned.
EMAIL_TO=mail@adresi.com In this line, we enter the e-mail address to which the reports will be sent.
Note: In some cases, since it does not ban the entire IP address, IP addresses containing the same numbers are also banned. To fix this;
netstat -tn –inet 2> /dev/null| grep “:80″ | awk ‘/tcp[ ]*[0-9]+[ ]*[0-9]+[ ]+[^ ]+[ ]*[^ ]*/ { print $5; }’ | cut -d”:” -f1 | sort | uniq -c | sort -n
We enter the command.
To clear banned IP addresses;
iptables -F
To delete the application from the system;
wget http://www.inetbase.com/scripts/ddos/uninstall.ddos
After pulling the file to the server;
sh uninstall.sh
We write and delete.
Good luck.
After logging in as Root via Putty SSH:
wget http://www.inetbase.com/scripts/ddos/install.sh
Let's write.
Behind
sh install.sh
Let's type and start the installation.
Editing conf file:
pico /usr/local/ddos/ddos.conf
Let's open the file by typing .
* If the pico command fails, try the nano command, which does the same thing.
APF_BAN=0 If this feature is 1, it bans with APF, if 0 it bans with iptables (If we do not know APF, it is useful to keep it at 0).
NO_OF_CONNECTIONS=150 >Specifies the maximum number of connections that can be made over an IP.
BAN_PERIOD=600 > This value indicates the time in seconds, 600 seconds given in the example equals 10 minutes, if more than 600 connections are made within 10 minutes, the IP will be banned.
EMAIL_TO=mail@adresi.com In this line, we enter the e-mail address to which the reports will be sent.
Note: In some cases, since it does not ban the entire IP address, IP addresses containing the same numbers are also banned. To fix this;
netstat -tn –inet 2> /dev/null| grep “:80″ | awk ‘/tcp[ ]*[0-9]+[ ]*[0-9]+[ ]+[^ ]+[ ]*[^ ]*/ { print $5; }’ | cut -d”:” -f1 | sort | uniq -c | sort -n
We enter the command.
To clear banned IP addresses;
iptables -F
To delete the application from the system;
wget http://www.inetbase.com/scripts/ddos/uninstall.ddos
After pulling the file to the server;
sh uninstall.sh
We write and delete.
Good luck.
🌐 Translated from Türkçe
FurkanK
Kayıtlı Üye
27.05.2013 20:26
2
It is very necessary in T.s. 😊
🌐 Translated from Türkçe
sonaycinar
Kayıtlı Üye
03.06.2013 22:50
3
avg -n
awk: ./tcp[
awk: ^ syntax error
awk: ./tcp[
awk: ^ unterminated regexp
awk: fatal: Invalid regular expression: /tcp[/
cut: the delimiter must be a single character
Try `cut --help' for more information.
-bash: }.: command not found
It gave a warning: Is it normal?
awk: ./tcp[
awk: ^ syntax error
awk: ./tcp[
awk: ^ unterminated regexp
awk: fatal: Invalid regular expression: /tcp[/
cut: the delimiter must be a single character
Try `cut --help' for more information.
-bash: }.: command not found
It gave a warning: Is it normal?
🌐 Translated from Türkçe
sonaycinar
Kayıtlı Üye
03.06.2013 22:52
4
I solved the problem. If it gives the error I mentioned above, do not mix the strings with the command:
netstat -tn --inet 2> /dev/null| grep ":80" | awk '/tcp[ ]*[0-9]+[ ]*[0-9]+[ ]+[^ ]+[ ]*[^ ]*/ { print $5; }' | cut -d":" -f1 | sort | uniq -c | sort -n
Write this and accept it
netstat -tn --inet 2> /dev/null| grep ":80" | awk '/tcp[ ]*[0-9]+[ ]*[0-9]+[ ]+[^ ]+[ ]*[^ ]*/ { print $5; }' | cut -d":" -f1 | sort | uniq -c | sort -n
Write this and accept it
🌐 Translated from Türkçe
mavibilisimm
Kayıtlı Üye
03.09.2013 14:34
5
I Want to Set Up a Firewall for My Ts, Please Help
🌐 Translated from Türkçe
rte2023
Engelli
17.11.2019 00:24
6
It is not blocked by software, it only bloats the CPU, for this a physical hardware firewall is required, the simplest thing is to buy an i7 processor and 10gbit port and install mikrotikOS to provide good protection.
🌐 Translated from Türkçe