LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-25-2017, 12:45 PM   #1
Newlife
LQ Newbie
 
Registered: Aug 2017
Posts: 3

Rep: Reputation: Disabled
UDP Flood Gameserver


Hello everyone,

my server is getting an udp syn flood, I tried several things on the Internet for about 3 hours now and nothing did really work.

First I tried to limit the incoming connections per IP with :
Code:
iptables -I INPUT -p udp --dport 6666 -i eth0 -m state --state NEW -m recent --set --name flood --rsource
iptables -I INPUT -p udp --dport 6666 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 --name flood --rsource -j DROP
But It didn't really help at all AFAIK. I also tried to cut it down to the packet length but that also did not help. Since I'm not familiar with the iptables ratelimit settings, I hope someone could lead me in the right direction.

Best Regards
 
Old 08-25-2017, 04:28 PM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
First question is are you sure that these are the ports being used for the UDP flood? UDP can come over any port and there is no such thing as SYNC in UDP.

Fire up wireshark and do a capture to see what UDP port is being hammered.
 
Old 08-25-2017, 07:56 PM   #3
Newlife
LQ Newbie
 
Registered: Aug 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi,

yes it's this port because I can see the connects in my gameserver logs, I already made a capture of it and it's always a specific length of 60 from spoofed random IP's
 
Old 08-26-2017, 02:07 AM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Here is what I would use but the problem with UDP is you might also drop legitimate traffic too.

Code:
iptables -N udp-flood
iptables -A INPUT -p udp -j udp-flood
iptables -A udp-flood -p udp -m limit --limit 50/s -j RETURN
iptables -A udp-flood -j LOG --log-level 4 --log-prefix 'UDP-flood attempt: '
iptables -A udp-flood -j DROP
If you don't want to log them remove the LOG rule.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mitigate UDP flood m4rtin Linux - Networking 3 10-17-2012 07:19 AM
How i can protect from udp flood boyan96 Linux - Networking 1 11-16-2011 06:09 PM
Windows UDP Flood? hoodez Linux - Networking 4 08-17-2010 08:17 PM
Flood of UDP 59002 from various IP's gadgetx23 Linux - Security 12 02-13-2010 07:58 AM
udp flood behind router darthaxul Linux - Software 3 08-17-2008 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration