Raised This Month: $32 Target: $400
 8% 

[Linux] Source Query Proxy: DDoS Protection - Kernel redirection!


Post New Thread Reply   
 
Thread Tools Display Modes
spumer
Senior Member
Join Date: Aug 2011
Old 01-25-2021 , 03:53   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #101

Added instruction for building BCC on Debian 10 Buster
https://github.com/spumer/source-que...ebpf/README.md
__________________
spumer is offline
RAIN182
Member
Join Date: Dec 2013
Location: Volgograd , Russian Fede
Old 02-06-2021 , 13:01   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #102

Is it relevant for csgo?
Server mirror?

Last edited by RAIN182; 02-06-2021 at 13:08.
RAIN182 is offline
spumer
Senior Member
Join Date: Aug 2011
Old 02-07-2021 , 11:52   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #103

Quote:
Originally Posted by RAIN182 View Post
Is it relevant for csgo?
Server mirror?
Depend on what do you want.

It's not a mirror, just query packets handler in separate process.

And i'm working on some algorithms to detect and mitigate ddos, but it's not public yet and experimental
__________________
spumer is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 02-08-2021 , 22:21   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #104

Hi, I just got identified some attackers
I have traced to Uruguay, and also from gameservers.com
Those UDP packets are using all my bandwidth and my CPU,
I will share my iptables
Attached Thumbnails
Click image for larger version

Name:	Sin título.png
Views:	170
Size:	18.7 KB
ID:	187129  
jeremyvillanueva is offline
pakgamerz
AlliedModders Donor
Join Date: Aug 2017
Old 02-08-2021 , 22:38   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #105

iptables wont solve completely flood or dos attacks. it will cause more problems.


The attacker can change methods and you keep changing your rules?



The solution would be to block this before come to your server. so where ever you host you can ask them for protection for this kind of flood or dos attacks.
pakgamerz is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 02-08-2021 , 23:31   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #106

Hi, may you share your experience?
What kind of protection do you use in your servers?
I think and as far as I can tell iptables could prevent
contact from the attacker, it doesn't consume your CPU, I've tried right now also,
jeremyvillanueva is offline
pakgamerz
AlliedModders Donor
Join Date: Aug 2017
Old 02-09-2021 , 00:11   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #107

i am using OVH Game + Addtional filters setup by Path.net


and instead of iptables i ise ufw to rate limit port 27015.


works good.
pakgamerz is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 02-27-2021 , 13:30   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #108

I want to share this iptables

It works for my 93 tickrate server, btw it also blocks rcon listening

sudo iptables --flush
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -t raw -F
sudo iptables -t raw -X
sudo iptables -t security -F
sudo iptables -t security -X
sudo iptables -F
sudo iptables -X
sudo iptables --new-chain RATE-LIMIT
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -A INPUT -p udp --destination-port 27015 --jump RATE-LIMIT
sudo iptables --append RATE-LIMIT --match hashlimit --hashlimit-mode srcip --hashlimit-srcmask 32 --hashlimit-upto 93/sec --hashlimit-burst 20 --hashlimit-name conn_rate_limit --hashlimit-htable-expire 30000 --hashlimit-htable-max 65535 --jump ACCEPT
sudo iptables --append RATE-LIMIT --match limit --limit 1/sec --limit-burst 1 --jump LOG --log-prefix "IPTables-Dropped: "
sudo iptables --append RATE-LIMIT --jump DROP
sudo iptables -A INPUT -p tcp --destination-port 27015 -j DROP
jeremyvillanueva is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 02-28-2021 , 17:58   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #109

Please be advised. If not locally connected --flush, will sever your SSH connection and the only way in is serial console if installed. It also will disable everything network like web server, DNS, and MAIL. Make a bash script or better just lay out the rules without flush.
Quote:
Originally Posted by jeremyvillanueva View Post
I want to share this iptables

It works for my 93 tickrate server, btw it also blocks rcon listening

sudo iptables --flush
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -t raw -F
sudo iptables -t raw -X
sudo iptables -t security -F
sudo iptables -t security -X
sudo iptables -F
sudo iptables -X
sudo iptables --new-chain RATE-LIMIT
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -A INPUT -p udp --destination-port 27015 --jump RATE-LIMIT
sudo iptables --append RATE-LIMIT --match hashlimit --hashlimit-mode srcip --hashlimit-srcmask 32 --hashlimit-upto 93/sec --hashlimit-burst 20 --hashlimit-name conn_rate_limit --hashlimit-htable-expire 30000 --hashlimit-htable-max 65535 --jump ACCEPT
sudo iptables --append RATE-LIMIT --match limit --limit 1/sec --limit-burst 1 --jump LOG --log-prefix "IPTables-Dropped: "
sudo iptables --append RATE-LIMIT --jump DROP
sudo iptables -A INPUT -p tcp --destination-port 27015 -j DROP
__________________
DJEarthQuake is offline
c2qute
Junior Member
Join Date: Dec 2008
Old 04-01-2021 , 22:23   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #110

i'm running into this, any ideas? servers are started via docker, which should not be an issue imo

Code:
2021-04-02 10:21:54,675 [INFO] [sqproxy.config] Confdir not found: /root/conf.d/conf.d
2021-04-02 10:21:54,675 [WARNING] [sqproxy] No one server to run. Please check config
i have both 00-globals and 01-csgo.yml as stated in the example

Last edited by c2qute; 04-01-2021 at 22:24.
c2qute is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode