Sinisterly
Installing Config Server Firewall - Block SYN and UDP attacks. - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Computers (https://sinister.li/Forum-Computers)
+--- Forum: Antivirus & Protection (https://sinister.li/Forum-Antivirus-Protection)
+--- Thread: Installing Config Server Firewall - Block SYN and UDP attacks. (/Thread-Installing-Config-Server-Firewall-Block-SYN-and-UDP-attacks)



Installing Config Server Firewall - Block SYN and UDP attacks. - Kaiten - 06-19-2014

Okay, this tutorial will be showing you how to install Config Server Firewall to work with your MyBB forum.
http://configserver.com/cp/csf.html

This will help you kill ddos attacks before they can do any damage, block spam, and http floods.
You can find a list of all the features here: http://configserver.com/cp/csf.html


You will need ROOT access to your server, and your OS must be supported by CSF.

Login via SSH and run these commands to install CSF.

Code:
rm -fv csf.tgz wget http://www.configserver.com/free/csf.tgz tar -xzf csf.tgz cd csf sh install.sh

If you did it correctly you should see the following.
[Image: a62aa47b51.png]

Part one.
Now we are going to start configuring the server to block DDoS, SYN, and HTTP attacks.

So now we want to open this config file.
Code:
cd /etc/csf nano csf.conf

You need nano to edit files.
Installing nano is very simple.

Code:
yum install nano

Now find each of these lines one by one.
Quote:CT_LIMIT
CT_SKIP_TIME_WAIT
SYNFLOOD
Edit their values to the following.
Quote:CT_LIMIT = "50"
CT_SKIP_TIME_WAIT = "1"
SYNFLOOD = "1"
That's all there is to it!
You will get an email when an attacking IP is blocked.

Part two.
Blocking known spammers

Now we want to open the config file again.

Quote:cd /etc/csf
nano csf.conf

Now find these lines.
Quote:LF_DSHIELD = "0"
LF_SPAMHAUS = "0"
LF_BOGON = "0"
Change the values to the following.

Quote:LF_DSHIELD = "86400"
LF_SPAMHAUS = "86400"
LF_BOGON = "86400"

This will block know spammers and spam addresses from BOGON, Dshield, and Spamhaus's lists.
Bogon isn't really that important, but it helps.


Now once this is finished your forum is protected from DDoS and spam attacks. Smile


Disable testing mode.
Spoiler:
In the config file find this line.

and change the one to a zero.
Quote:TESTING = "1"
Now restart the service.
Quote:service csf restart
service lfd restart
[/quote]


RE: Installing Config Server Firewall - Block SYN and UDP attacks. - The Real Slim Shady - 06-20-2014

why is installing a text editor a part of this tutorial? you didnt expand on how to use it, so you might as well have just said use a text editor. linux usually comes with several of these pre-installed that installing another is unnecessary. you dont NEED to use nano at all.


RE: Installing Config Server Firewall - Block SYN and UDP attacks. - Kaiten - 06-20-2014

(06-20-2014, 12:28 AM)Geoff Wrote: why is installing a text editor a part of this tutorial? you didnt expand on how to use it, so you might as well have just said use a text editor. linux usually comes with several of these pre-installed that installing another is unnecessary. you dont NEED to use nano at all.

Some systems only come with vi, vi is awful.
And originally I didn't, however people asked me how to edit the file when I posted it last. So I made edits.


RE: Installing Config Server Firewall - Block SYN and UDP attacks. - The Real Slim Shady - 06-20-2014

(06-20-2014, 01:01 AM)Kaiten Wrote:
(06-20-2014, 12:28 AM)Geoff Wrote: why is installing a text editor a part of this tutorial? you didnt expand on how to use it, so you might as well have just said use a text editor. linux usually comes with several of these pre-installed that installing another is unnecessary. you dont NEED to use nano at all.

Some systems only come with vi, vi is awful.
And originally I didn't, however people asked me how to edit the file when I posted it last. So I made edits.

vi works. but still, the tutorial doesnt describe how to use nano. it may be easier to use than vi but its still not self explanatory.

all im saying is that suggesting that nano is needed to edit files is misleading and incorrect. and simply telling someone to install nano, isnt gonna help someone that needs to be told how to install nano. if you need to go into the level of detail that involves how to install the software, you'll need to go into detail on how to use the software, such as saving your changes.


RE: Installing Config Server Firewall - Block SYN and UDP attacks. - Kaiten - 06-20-2014

(06-20-2014, 01:34 AM)Geoff Wrote:
(06-20-2014, 01:01 AM)Kaiten Wrote:
(06-20-2014, 12:28 AM)Geoff Wrote: why is installing a text editor a part of this tutorial? you didnt expand on how to use it, so you might as well have just said use a text editor. linux usually comes with several of these pre-installed that installing another is unnecessary. you dont NEED to use nano at all.

Some systems only come with vi, vi is awful.
And originally I didn't, however people asked me how to edit the file when I posted it last. So I made edits.

vi works. but still, the tutorial doesnt describe how to use nano. it may be easier to use than vi but its still not self explanatory.

all im saying is that suggesting that nano is needed to edit files is misleading and incorrect. and simply telling someone to install nano, isnt gonna help someone that needs to be told how to install nano. if you need to go into the level of detail that involves how to install the software, you'll need to go into detail on how to use the software, such as saving your changes.

Considering most people doing this should already know how to use text editors, or at least "software -h" I didn't feel the need to explain all of its usage.


RE: Installing Config Server Firewall - Block SYN and UDP attacks. - The Real Slim Shady - 06-20-2014

(06-20-2014, 01:39 AM)Kaiten Wrote:
(06-20-2014, 01:34 AM)Geoff Wrote:
(06-20-2014, 01:01 AM)Kaiten Wrote:
(06-20-2014, 12:28 AM)Geoff Wrote: why is installing a text editor a part of this tutorial? you didnt expand on how to use it, so you might as well have just said use a text editor. linux usually comes with several of these pre-installed that installing another is unnecessary. you dont NEED to use nano at all.

Some systems only come with vi, vi is awful.
And originally I didn't, however people asked me how to edit the file when I posted it last. So I made edits.

vi works. but still, the tutorial doesnt describe how to use nano. it may be easier to use than vi but its still not self explanatory.

all im saying is that suggesting that nano is needed to edit files is misleading and incorrect. and simply telling someone to install nano, isnt gonna help someone that needs to be told how to install nano. if you need to go into the level of detail that involves how to install the software, you'll need to go into detail on how to use the software, such as saving your changes.

Considering most people doing this should already know how to use text editors, or at least "software -h" I didn't feel the need to explain all of its usage.

you'd think if they were doing this they would know how to install a text editor as well - but you've made a point to include that. why would you expect that they're on a linux machine, not know how to install a text-editor, but be able to jump in and start using one with no help.

point is - if you're going to target complete noobs, then target complete noobs. dont target them and then leave them hanging because you think they should know what to do. Likewise, if you're not targeting complete noobs, putting in something that basic is just condescending to your readers. and doing half/half just doesnt make sense.

not to mention that yum only works on some distro's. you've gone into no detail and will only work on rpm based distro's. which will simply confuse noobs on popular deb distro's like debian, ubuntu, mint, and even kali.


RE: Installing Config Server Firewall - Block SYN and UDP attacks. - Kaiten - 06-20-2014

(06-20-2014, 01:50 AM)Geoff Wrote:
(06-20-2014, 01:39 AM)Kaiten Wrote:
(06-20-2014, 01:34 AM)Geoff Wrote:
(06-20-2014, 01:01 AM)Kaiten Wrote:
(06-20-2014, 12:28 AM)Geoff Wrote: why is installing a text editor a part of this tutorial? you didnt expand on how to use it, so you might as well have just said use a text editor. linux usually comes with several of these pre-installed that installing another is unnecessary. you dont NEED to use nano at all.

Some systems only come with vi, vi is awful.
And originally I didn't, however people asked me how to edit the file when I posted it last. So I made edits.

vi works. but still, the tutorial doesnt describe how to use nano. it may be easier to use than vi but its still not self explanatory.

all im saying is that suggesting that nano is needed to edit files is misleading and incorrect. and simply telling someone to install nano, isnt gonna help someone that needs to be told how to install nano. if you need to go into the level of detail that involves how to install the software, you'll need to go into detail on how to use the software, such as saving your changes.

Considering most people doing this should already know how to use text editors, or at least "software -h" I didn't feel the need to explain all of its usage.

you'd think if they were doing this they would know how to install a text editor as well - but you've made a point to include that. why would you expect that they're on a linux machine, not know how to install a text-editor, but be able to jump in and start using one with no help.

point is - if you're going to target complete noobs, then target complete noobs. dont target them and then leave them hanging because you think they should know what to do. Likewise, if you're not targeting complete noobs, putting in something that basic is just condescending to your readers. and doing half/half just doesnt make sense.

not to mention that yum only works on some distro's. you've gone into no detail and will only work on rpm based distro's. which will simply confuse noobs on popular deb distro's like debian, ubuntu, mint, and even kali.

No one in their right mind would use Mint as a server.
But anyways, it was only there because I was asked to put it there.
And if you are on a Linux machine at all you should know how to use the help command, assuming someone is stupid would be pointless.
Not to mention this guide wasn't meant to spoon feed, it was simply made to help people install a firewall.
If you think your server needs a firewall than you should understand basic Linux commands.
But I see your point, so I shall not argue.