Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm going to have a Snort machine on my network but not sure where the best place for it is. I have a couple of web servers on my LAN side that are only open to the Internet on the port that httpd is listening on. Should I place Snort on my LAN or should I place it in front of my Linksys firewall between it and my cable modem. Any help is greatly appreciated, thanks!
Depends on what you are most concerned about. If external threats more of a concern, then you'd want the sensor to be outside the firewall. If your more concerned about internal hosts getting compromised and creating havok on your network, then an internal sensor would be ideal. If you need to monitor both, then put a second NIC in the snort sensor and put ethertaps on both the external and internal networks. If that isn't an option, then personally I'd go with a putting the sensor outside the LAN so that you can monitor more of the traffic (including that going to the firewall box).
But aren't there all kinds of traffic coming into my modem from the Internet all the time, only to be blocked by my firewall? Wouldn't my snort box be practically logging everything out there? I would still be unsure if one of my internal machines became compromised. Maybe I should just keep it on the internal side to be sure that nothing is compromised. Any thoughts?
Id suggest having Snort between your Primary Firewall / router and your screened subnet. In this scenerio the only traffic that should be accepted to your screened subnet is the destination port of the service port. You can set Snort host as being a transparent bridge or as just a simple IP forwarding router. This of course gives your network a single point of failure, where as locating it on the Lan would render mostly the same results but may miss some, but Snort will give you false positives/negatives anyways.
Ideally you would have
Packet FIlter Firewall -----> Stateful packet inspection firewall --> Snort IDS or Snort-Inline ---> Screened subnet.
(cisco router or linux) (properly written stateful rules) (Snort IDS/IPS ) ( mail / webserver )
By minimizing the amount of traffic that actually gets to the Snort box is ideal as snort can become extremely CPU intensive and fill up log files easily if you were to leave it plugged directly into the external address without a proper firewall it will see way to many things to properly identify whats actually getting to your screened subnet.
Take a look at the Snort FAQ on this, as it has a discussion on the various pros and cons of this. Personally I don't think there is any one "right" answer, but is really going to depend on your policy as well as personal preference. If you put the sensor inside the network, you'll certainly get alot less alerts, but I'm of the opinion that it tends to give you a false sense of security plus you're implicitly trusting the integrity of your firewall box. I'd rather have the sensor outside and see as much of the traffic as possible. The tradeoff is that you have to fine-tune your snort rules otherwise you'll get a lot of false positives. If none of that is really important to you, then putting it inside your firewall somewhere would probably be best for you.
That being said, unless I was running snort-inline, I would be hesitant to put the sensor anywhere on your network where a failure or DoS against Snort itself would take down your entire network. I'd recommend using a hub (make sure it's not a switch) or mirroring the traffic to the sensor somehow.
I would have snort connected to the hub, and my web servers and personal PC connected to the switch. I think this would be ideal because snort will catch all the traffic going through the hub.
I'll have to look into the Snort-Inline thing, I've only read about the IDS part.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.