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.
Hello. This is a bit of a security design question and there is no right answer but I would just like to get different opinions on the matter.
I am using ssh to allow myself to access my server from specific remote locations. I decided to use TCP Wrappers to deny everyone the ssh service. Of course I allowed myself to access ssh from specific IP's.
Now I have a router with a built in Firewall that sits between my server and the Internet. I could easily configure the router's firewall to deny everyone access to ssh except for certain IP's.
Now what is the preferred way to do this from a security standpoint? Basically I have three options:
1) Stop ssh access at the firewall
2) Stop ssh access with the TCP Wrappers
3) Stop ssh access using both the firewall and TCP Wrappers
The only reason that I am currently using TCP Wrappers, rather then the firewall or both, is that if someone does attempt to login who I am not familiar with I will be able to see this in my log files. Unfortunatly, the router's firewall does not have any logging capabilities.
I'm not too familiar with TCP Wrappers and I dont' know if stopping access at the Firewall would be more secure then using the TCP Wrappers. I am sure however that using both would probably be the most secure way but the downside of this is that I won't be able to see failed attempts in log files.
Heres your chance to pretend to be a big shot Security Consultant. What would you recommend?
Your choice of words. In my book "consultant" and "account manager" are the two titles that spell major trouble...
AFAIK what you're trying to do is find a balance between an essential requirement, a "gotta have": security and a commodity, a "nice to have": logging. Logging can be a result/spin off of a tightened security posture, but logging can't lead to heightened security (even realtime logging is in essence too late, and who watches logs from 10 boxen the whole damn day). So I'd say stop it as soon as you can, at the router. Skiddies will probe 'n try, fail, and move on.
This doesn't mean you shouldn't set up apps to use libwrap or not have a firewall script in place on the server itself: don't make a single point of failure out of your router.
I'd also suggest running Snort on the server. That'll be outright boring. But say one of your remote trusted hosts get's compromised you'll still have a good chance of dropping traffic that looks like it's trying to run an exploit tru your sshd.
Yeah I've heard of this SNORT thing and I've tried to install it but had no luck. I think I somehow went for the advanced installation because I wall installing things like ACID and WebAdmin and all this crap. How can I set up SNORT easily? How do you have it set up?
From a paranoid point of view (= my point of view) I would limit access to SSH on the firewall, then tcp_wrappers and then on the service itself ... so 3 security layers :-)
How can I set up SNORT easily?
just install the tarball, install Barnyard for parsing unified log format and say, Guardian if you want blocking based on alerts.
My sshd_config file looks very similar to the one shown in the Thread you mentioned markus1982 however there is one difference. I have PasswordAuthentication set to Yes. I'm not to clear on this in SSH but if I set PasswordAuthentication to No then the client must have my public key to access SSH right? How does SSH know what user to log in as if you are not prompted for a username and password?
Last edited by Crashed_Again; 01-30-2003 at 01:13 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.