NatureNMoon
Restricted
- Jul 8, 2016
- 70
- 124
- 86
Hi everyone
I saw many people who have some serious issues for valve games like CSGO, RUST etc...
If you are providing VALVE GAMES and under attack, please use the iptables rule set below;
If you do not have IPTABLES or IPSET, or you are not sure if you have them or not, please use the command line below;
For CentOS:
For Ubuntu/Debian:
Here is the iptables rule set for VALVE GAMES(Read the detailed description in the script)
Please put the bash script into a file called r4p3-valve.sh;
There is a command line "-d r4p3" in the bash script, please change it by using your external ip address. For example; "-d 67.67.67.67" or whatever it is.
How to start?
I saw many people who have some serious issues for valve games like CSGO, RUST etc...
If you are providing VALVE GAMES and under attack, please use the iptables rule set below;
If you do not have IPTABLES or IPSET, or you are not sure if you have them or not, please use the command line below;
For CentOS:
Code:
yum install iptables && yum install ipset
For Ubuntu/Debian:
Code:
apt-get install iptables && apt-get install ipset
Here is the iptables rule set for VALVE GAMES(Read the detailed description in the script)
Please put the bash script into a file called r4p3-valve.sh;
There is a command line "-d r4p3" in the bash script, please change it by using your external ip address. For example; "-d 67.67.67.67" or whatever it is.
Bash:
#!/bin/bash
# Daniel Q. - Nature N Moon - Valve DDOS Protection - R4P3.NET
# Use this command line "chmod 777 r4p3-valve.sh && ./r4p3-valve.sh"
# The IPTABLES script has been created to keep the Valve Servers alive by Natuere N Moon in R4P3.NET
# Your SSH port must be 22
# Your web applications must be 80 or 443
# File Transfer Port: 21
# There is a command line "-d r4p3" in the bash script, please change it by using your external ip address. For example; "-d 34.34.34.34" or whatever it is.
echo "R4P3 VALVE RULE SET HAS BEEN SUCCESSFULLY STARTED"
ipset create valve_allowed hash:ip hashsize 2097152 maxelem 40000000 timeout 259200
iptables -N R4P3_VALVE -t raw
iptables -N VALVE -t raw
iptables -A PREROUTING -t raw -j R4P3_VALVE
iptables -A R4P3_VALVE -d r4p3 -t raw -m set ! --match-set valve_allowed src -j VALVE
iptables -A VALVE -t raw -p tcp -m multiport --dports 21,22,80,443,27015:27030,27036:27037 -j RETURN
iptables -A VALVE -t raw -p udp --sport 53 -m length --length 750:65535 -j DROP
iptables -A VALVE -t raw -p udp ! --sport 53 -m hashlimit --hashlimit-upto 7/sec --hashlimit-burst 10 --hashlimit-mode dstip --hashlimit-name r4p3_valve --hashlimit-htable-max 2000000 -m string --string "TSource" --algo kmp -j SET --add-set valve_allowed src
iptables -A VALVE -t raw -m set ! --match-set valve_allowed src -j DROP
echo "R4P3 VALVE RULE SET HAS BEEN SUCCESSFULLY DONE"
How to start?
Code:
chmod 777 r4p3-valve.sh && ./r4p3-valve.sh
Last edited: