LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2017, 02:02 PM   #1
hassanshams
LQ Newbie
 
Registered: Jun 2017
Posts: 1

Rep: Reputation: Disabled
how to simulate load to my website ?


I have a website on two apache servers and nginx as reverse proxy and i want to test the performance of the apache after the load balancing, after searching around i found out that what i want is layer 7 ddos (distributed denial of service) so far i tried a few tools like:LOIC, swithblade4 using windows, andyloris,slowhttptest,torshammer,rudy using kali linux and NO LUCK! while doing the attack i was opening the cpu usage of the nginx machine and the apache, the nginx goes down like 91% and the apache like 97% !!
Is there certain configuration that i should change on the apache or nginx

Last edited by hassanshams; 06-08-2017 at 02:15 PM.
 
Old 06-08-2017, 03:35 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Hi hassanshams,

Welcome to the forum!

For DDoS there are a few tricks, like limiting the number of connections per IP, syn cookies, directing legitimate traffic to a certain high port before allowing it to the main page, and using iptables to check if the IP in question has triggered the high port you're using.

There are also hundreds of queueing and balancing methods. It just depends on how you want to do it. https://javapipe.com/ddos/blog/iptab...os-protection/
 
Old 06-09-2017, 04:11 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,185

Rep: Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377
While AwesomeMachine gives some good advice the problem with an external DDoS attack is that the traffic will be coming down and congesting your link before any of the suggestions take place. If you've a 100Mb link and some scumbag throws 1Gb of traffic at it then that link will be saturated and all the filtering etc. that's in place behind your link will be effectively useless. The best method of DDoS mitigation is to use an external traffic "scrubbing" service that can handle large amounts of traffic and will only pass "clean" traffic through to your backend. These services aren't cheap, but depending on how available you need your site and how "attractive" it is as a DDoS target it may be worth it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NGINX + nginx-rtmp-module + HLS + OBS Manoel Júnior Linux - Server 0 08-10-2016 05:45 AM
nginx/1.4.1 '/etc/nginx/sites-available/default' missing Jalalabee Linux - Newbie 0 06-05-2013 07:44 AM
nginx + php-fpm and nginx modules fantasygoat Linux - Server 0 06-09-2011 12:21 PM
Nginx experts help me-problem when using Nginx php-fpm !!! HuMan-BiEnG Linux - Server 2 04-17-2011 02:30 PM
NGINX with PHP-FPM vis NGINX with Spawn-FCGI WhisperiN Linux - Server 1 03-15-2011 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:50 AM.

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