LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-05-2019, 05:20 PM   #1
martyns
LQ Newbie
 
Registered: Jan 2019
Posts: 3

Rep: Reputation: Disabled
help with filtering ddos attacks in iptables


Hi, Im having some ddos attacks bypasses on my vps, Im using only teamspeak 3 and only UDP is problem here, how do I filter ddos attack, I heard its best to filter by payload how do I do that? I think I have some tcpdumps to upload if someone can help me
 
Old 01-07-2019, 03:16 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You can use following command to block UDP DDoS from particular IP, such as 10.10.10.10
iptables -t raw -A PREROUTING -p udp -s 10.10.10.10 -j DROP
 
Old 01-07-2019, 05:12 PM   #3
martyns
LQ Newbie
 
Registered: Jan 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Lol, yea for DoS.. for DDoS is useless because you'll be getting hundreds spoofed addresses so yea, and my questin is how to filter by payload
 
Old 01-08-2019, 02:34 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
iptables -A INPUT -m string --algo bm --string "test" -j DROP
 
Old 01-08-2019, 04:02 PM   #5
martyns
LQ Newbie
 
Registered: Jan 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
I just enter payload instead test?
 
Old 01-09-2019, 03:21 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Above is sample, if payload include "test" keyword, the packet will be dropped.
 
Old 01-13-2019, 01:39 PM   #7
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
However...... DDoS mitigation at server / router level is too late. The traffic is already coming down your link and that alone can / will clog your bandwidth and make your server unreachable.

The brutal reality is that a properly formed DDoS attack needs mitigation at ISP level or through a DDoS mitigation / traffic cleaning service.
 
Old 01-14-2019, 02:26 PM   #8
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Based on my understanding, Linux can only do basic or simple DoS or DDoS.
 
  


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
Blocking common ddos attacks with IPTables Skidprevention Linux - Networking 37 02-24-2015 03:10 PM
Hacked Home Routers being used in massive DDOS attacks, you can help stop it metaschima Linux - Security 0 01-13-2015 12:44 PM
LXer: World Live DDoS attack maps – Live DDoS Monitoring LXer Syndicated Linux News 0 08-09-2014 08:30 PM
Help Me stop Botnet ddos attacks Drutten Linux - Security 6 08-18-2008 11:56 AM
Concerning DDoS attacks joji_in_changwon Linux - Security 13 11-27-2007 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:01 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