Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
10-14-2009, 10:29 AM
|
#16
|
|
Member
Registered: May 2005
Location: Northern VA
Distribution: Slackware, FreeBSD, OpenBSD, Mac OS X , Backtrack, Ubuntu on a Dell Mini 9
Posts: 780
Rep: 
|
Quote:
Originally Posted by avijitp
How about using the tcp wrapper. It is supported by all the distro that I am aware of. Just need to add something like this in your /etc/hosts.deny & /etc/hosts.allow
SNIP THE REST
|
No need to even touch tcpwrappers...you can do the same thing within the sshd config itself.
|
|
|
|
10-14-2009, 10:45 AM
|
#17
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,706
|
Quote:
Originally Posted by unixfool
No need to even touch tcpwrappers...you can do the same thing within the sshd config itself.
|
That's just going full circle. I don't like the idea of making the change so specific. keep it generic where possible.
|
|
|
|
10-14-2009, 11:31 AM
|
#18
|
|
Member
Registered: May 2005
Location: Northern VA
Distribution: Slackware, FreeBSD, OpenBSD, Mac OS X , Backtrack, Ubuntu on a Dell Mini 9
Posts: 780
Rep: 
|
Quote:
Originally Posted by acid_kewpie
That's just going full circle. I don't like the idea of making the change so specific. keep it generic where possible.
|
I don't think so. The issue is allowing certain IPs access vis SSH. It directly addressed the OP's question by allowing REGULAR user access (no root). Why even use tcpwrappers when this is pretty much built into SSHD?
What do you mean by not liking the idea of making the change so specific and keeping it generic as possible? Generic as in how (in response to my response to avijitp). Seriously, I'm not trying to be confrontational, but it almost sounds like you replied to the wrong thread.
|
|
|
|
10-14-2009, 12:55 PM
|
#19
|
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD, Ubuntu (desktop)
Posts: 3,859
Rep: 
|
Quote:
|
Originally Posted by avijitp
How about using the tcp wrapper. It is supported by all the distro that I am aware of. Just need to add something like this in your /etc/hosts.deny & /etc/hosts.allow...
|
Not bad, except it doesn't solve OP's account-sensitive requirements. 
|
|
|
|
10-14-2009, 01:26 PM
|
#20
|
|
Member
Registered: May 2005
Location: Northern VA
Distribution: Slackware, FreeBSD, OpenBSD, Mac OS X , Backtrack, Ubuntu on a Dell Mini 9
Posts: 780
Rep: 
|
Quote:
Originally Posted by anomie
|
I intentionally ignored those requirements, as I think there are better alternatives than logging in as root (I stated this earlier in the thread). As to locking down the service itself and not factoring in the root account, filtering via tcpwrappers andor the SSH ACLs isn't a bad answer, IMO.
 
|
|
|
|
09-24-2010, 09:56 AM
|
#21
|
|
Member
Registered: Jun 2010
Posts: 31
Rep:
|
Interesting discussion about the possible reason to allow root login.
Well... there could be no really good enough reason to allow root login... maybe you are right there...
But I assure you there are good reason to look for a way to restrict root access to subnet. And it is when you start from the point where root login "must" be available.
My case for example... I'm working on a server where my boss has root login access and taking away his root access is not an option for me I assure you  . In this case isn't it the best practice for a good server admin at least to enforce security by restricting the access only to the subnet my boss use???... Of course, better something than nothing fellows.
And save me the effort of explaining you why I can not try to explain my boss security risks and stuff like that... simply know that there are cases where you have to allow root access and that's all!!
So my point is... this thread ("Only permit certain IP's to login as root through ssh") is quite valid and does not indicates anything about the quality of the procedures of the admins which implements this kind of restriction... well... maybe at first glance... 
|
|
|
1 members found this post helpful.
|
09-24-2010, 11:17 AM
|
#22
|
|
Member
Registered: May 2005
Location: Northern VA
Distribution: Slackware, FreeBSD, OpenBSD, Mac OS X , Backtrack, Ubuntu on a Dell Mini 9
Posts: 780
Rep: 
|
Quote:
Originally Posted by juan10dan
But I assure you there are good reason to look for a way to restrict root access to subnet. And it is when you start from the point where root login "must" be available.
My case for example... I'm working on a server where my boss has root login access and taking away his root access is not an option for me I assure you  . In this case isn't it the best practice for a good server admin at least to enforce security by restricting the access only to the subnet my boss use???... Of course, better something than nothing fellows.
And save me the effort of explaining you why I can not try to explain my boss security risks and stuff like that... simply know that there are cases where you have to allow root access and that's all!!
So my point is... this thread ("Only permit certain IP's to login as root through ssh") is quite valid and does not indicates anything about the quality of the procedures of the admins which implements this kind of restriction... well... maybe at first glance... 
|
Regardless of your job position and the fact that your manager requires root access, its still wrong. Is your boss actually performing admin functions? Have you attempted to explain to him the dangers of using root? Have you explained to him/her that he/she can still gain root access after logging in as a normal user but that root should only be used when needed?
You're doing him/her a disservice if you're not explaining the proper way to do things. If you're afraid to do this, then the fault is yours, not the manager's. If you've done this and have been reprimanded/ignored, that's another issue...still though, this doesn't change the fact that there is only one right way regarding root access (right way = use only when needed and to leverage sudo).
|
|
|
|
09-27-2010, 03:09 PM
|
#23
|
|
Member
Registered: Jun 2010
Posts: 31
Rep:
|
Quote:
Originally Posted by unixfool
Regardless of your job position and the fact that your manager requires root access, its still wrong. Is your boss actually performing admin functions? Have you attempted to explain to him the dangers of using root? Have you explained to him/her that he/she can still gain root access after logging in as a normal user but that root should only be used when needed?
You're doing him/her a disservice if you're not explaining the proper way to do things. If you're afraid to do this, then the fault is yours, not the manager's. If you've done this and have been reprimanded/ignored, that's another issue...still though, this doesn't change the fact that there is only one right way regarding root access (right way = use only when needed and to leverage sudo).
|
Well... let's say that I did my job and tell him and I still have to let him access as root. So... Would you advise me to let root open for any network when I can restrict at least outside?. I think no.
However, the proper way to guide someone to do something like that is telling him/her the potential risks. In that way I agree with all of the security aware users in this thread.
|
|
|
|
09-28-2010, 07:19 AM
|
#24
|
|
Member
Registered: May 2005
Location: Northern VA
Distribution: Slackware, FreeBSD, OpenBSD, Mac OS X , Backtrack, Ubuntu on a Dell Mini 9
Posts: 780
Rep: 
|
Quote:
Originally Posted by juan10dan
Well... let's say that I did my job and tell him and I still have to let him access as root. So... Would you advise me to let root open for any network when I can restrict at least outside?. I think no.
|
I already explained myself...some things just need to be stated, but we seem to agree.
Quote:
|
However, the proper way to guide someone to do something like that is telling him/her the potential risks. In that way I agree with all of the security aware users in this thread.
|
Thank you.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:52 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|