Quote:
Originally Posted by vondie
I have a CentOS 5.3 server hosting our companies website. The connection to the site is through a Cisco RVS4000 security router. The website is the only device on the network that uses this router and the router only has one inbound rule which forwards port 80 to the website.
|
Firstly, I know nothing of that particular Cisco device, so bear that in mind in considering my answer. When you say it is a 'security router', I assume that it is a router with Cisco's firewall functionality built-in.
Quote:
Originally Posted by vondie
I setup the Linux environment following instruction I found here for CentOS 5.3 over a year ago. Lately, we have been getting hit with various DoS attacks. Being a Linux novice, I'm looking for some help in preventing these DDoS attacks.
|
You mention DoS and DDoS; do you mean that you are getting both, or was one of those a typo? I have doubts about this, anyway....
Quote:
Originally Posted by vondie
When the most recent attack occurred, I actually see traffic logged coming from the internal IP of my website.
|
For a DoS (whether DDos or just DoS) attack, the identifying characteristic would be a lot of traffic coming in to your server from the outside. You don't seem to have this, so the question is at least open whether this is a DoS-type attack or whether someone has control of your server, in some way, and is using it to send out traffic. This is what you would expect if, for example, your server had been made part of a botnet.
Quote:
Originally Posted by vondie
For example, the IPS report shows DDOS_TYPE_UDP_FLOOD with the source IP of 192.168.0.50 which is the internal IP of website. How in the world is my website generating the traffic? The log about 30 minutes prior to the flood shows "Possible DoS HGOD SynKiller Flooding" with a source IP of 69.162.102.55.
|
...with the source IP of 192.168.0.50....
So, it is coming from your server. If that's a DoS, you are committing the attack, and its not an attack on you.
.... How in the world is my website generating the traffic? ...
Someone has installed a program that generates the traffic.
...The log about 30 minutes prior to the flood shows "Possible DoS HGOD SynKiller Flooding" with a source IP of 69.162.102.55.....
If your server has been co-opted into a botnet, then this packet may be the instruction as to what your server should do.
Note that one slight mystery is that, as far as I know, the HGOD piece of malware is for Windows: while this means that it should not run on Linux, if someone has installed something like Wine, or a virtual machine environment, you could probably make linux run it. Another possibility is that what you have is just similar to HGOD and it has been mis-identified.
Some general comments:
it seems that the configuration of this server has allowed some unpleasant person to get some level of control. You really, really want to find out what that mistake has been, because you don't want to make the same mistake again, when the server is reconfigured.
It seems (note again my total lack of knowledge on Cisco) that you may be able to get some temporary relief from this problem by using firewall rules (on the Cisco, or on the server...or both) to drop any packets from 69.162.102.55. This is
not a solution, but may give you a bit more time to work on the problem.
If you have taken a sensible approach to website development, you will have a development machine as well as this, your production server. This may be a time when you could swap the two to advantage. That is, transfer your dev machine to host the production site and quarantine your current production machine until your have investigated the issue and put measures in place.
You need to ensure that you have put best practices in place. What I would
not advise though is to assume that just putting something in place for, eg, passwords will necessarily fix the problem; if the problem is really with the ssh configuration (or some other service), then insisting on slightly stronger passwords may not do it for you. (Or, maybe it will, if the problem was that someone was getting in via ssh because the passwords were weak.)
This suggests that you put some effort into forensics, in that if you find out how someone got in, you can be sure to direct effort to that particular problem. Otherwise you just 'scattergun', and that may not hit the particular target, although you should not ignore the more general 'best practice' side, too.
Having said that, you should read some 'best practice' type guides, to put you into a better position in the very short term. I would suggest as a very minimum that you ought to be able to tick the following boxes, right now:
- strong passwords
- no root log-in
- ssh security meaures (see, eg, the samhain doc, referenced in the URL later)
- considered firewall approach (whatever that means, in context, after maybe you have modified things, see next item)
You did, in an earlier post, ask about dual NICs and security. In the normal case, you would put the server in the DMZ/'Orange' interface, of a firewall. This would not require dual NICs on the server. It wasn't mentioned there, I take it that this is not the architecture that you have considered?
You need to have a look at
this; but do note the comment
Quote:
Please do not try to read everything in one go
|
You need to think about what you need
now and initially concentrate on references which focus on what you need
now. You can, and should, go back later and read more.
Quote:
Originally Posted by vondie
Again, I'm very much a novice to Linux so bear with me if I haven't provided enough information to aid in solving this issue.
|
Be aware that there is not a simple, straightforward "Do this, and have security forever" position. It is a process, a journey, with new threats coming up and someone has to give it (some) continuous attention to evolving threats and more general housekeeping.
I get the impression, maybe incorrectly, that the organisation for which you work has decided to do this website thing 'on the cheap'. Perhaps the one thing that you could do out of this is to point out that the website doesn't run itself and that it does need some ongoing attention (and the budget for that) to security, backups, etc, etc. I'm also guessing, probably unfairly, that at the time that this started you had no idea whether the server box was patched and up-to-date and that the same may well apply to the Cisco.