Language Selection

English French German Italian Portuguese Spanish

Quick way to stop apache and connect floods with csf

Filed under
Howtos

 
Well first off this will only stop http or connect floods if you are having a real ddos problem you should be on a protected network otherwise there isnt much you can do server level if the attacks are pretty big. Using this method in combination with a protected network is the best way to go if you are having dos problems or host sites that do.
If you dont have CSF you can get it at www.configserver.com

This is real handy if your server is lagging badly, In some cases you have to tune down the connection limit to around 30 or less, depends how many ips hitting, etc; What this does is it kills apache, lowers the connection limit in csf.conf and restarts everything. When it does and lfd daemon runs again it will ban all of the ips with so many connections.
 
Code:

cp /etc/csf/csf.conf /etc/csf/csf.conf2
 
Code:

nano -w /etc/csf/csf.conf2
ctrl+w search for tracking, will be the second result. Turn your connection level to where you want it to be. Usually 30 gets the job done. You can always change it to suit the situation
 
Code:

nano -w /usr/bin/dos
insert
 
Code:

killall httpd ; cp -R /etc/csf/csf.conf /etc/csf/csf.conf1 ; cp -R /etc/csf/csf.conf2 /etc/csf/csf.conf ; csf -r ; service httpd restart
here is shortcut script to turn your connection limit back to normal
 
Code:

nano -w /usr/bin/dosoff
insert
 
Code:

cp -R /etc/csf/csf.conf1 /etc/csf/csf.conf ; csf -r
 
Code:

chmod 700 /usr/bin/dos /usr/bin/dosoff
Now you can go in your server and quickly fight it.
Just enter dos in your terminal to start it. And dosoff to set back to normal. Hope this can help someone

More in Tux Machines

KDE: Simple by Default, Powerful When Needed

KDE (back when it was still the name of the desktop environment) and our applications historically stood for powerful features and great flexibility and customizeability. This is what our users love about our software, this is why they choose Plasma and KDE software instead of one of the other Free desktop offerings. And it is also something they would fight tooth and nail for if we wanted to take it away (as many a KDE maintainer who dared to remove a feature he thought was unnecessary can tell). Read more

BitTorrent Bleep alpha released for Android

As an alpha it still has some issues “As with any Alpha, there are some known issues and bugs to work out. Android users will need to set the app to “Wi-Fi Only” unless you have an unlimited data plan; this is only for the time being while we iron out and issue related to battery and data-plan. And while you can move a username from desktop to mobile, Bleep does not yet support moving an existing account from Android to the desktop. And while you can receive messages on multiple devices; messages sent will not be seen across all devices. As with our previous release, communications happen only when all parties are online – you cannot send offline photos or group chats asynchronously.” Read more

During Akademy 2014

This year there were lot of fast track (10 minutes) talks on different areas around KDE. All of them were quite interesting, some of them are: Bruno Coudoin talked about how and why GCompris moved to QtQuick with the support of KDE. What all challenges project faced while moving from GTK to Qt. Daniel Vrátil talked about his one year journey with Akonadi Martin Gräßlin gave an overview of current state of Kwin in adding Wayland support and future plans. Kevin Ottens talked about KDE craftsmen where analysis was on the way we handle our software production, how can we make our software even better. Kai Uwe Broulik talked about current status of Qt port on Android and iOS. Currently, 3 iOS apps in Apple store and 8 Android apps in Google play since December 2013. Read more

Leftovers: Software