ip access control | sshd_config

This is a discussion on ip access control | sshd_config within the Linux Security forums, part of the System Security and Security Related category; Greetings - While I can use AllowUsers in sshd_config to control which users with valid accounts can access one of my ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-26-2005
cooch17@NOSPAMverizon.net
 
Posts: n/a
Default ip access control | sshd_config

Greetings -

While I can use AllowUsers in sshd_config to control which users with
valid accounts can access one of my boxes via ssh, I'm wondering if
there is a way to specify a list of ip addresses which are allowed to
access sshd? I've searched around a bit, but didn't find anything that
looked like what I've described.

Thanks...
Reply With Quote
  #2 (permalink)  
Old 03-26-2005
Michael Heiming
 
Posts: n/a
Default Re: ip access control | sshd_config

In comp.os.linux.security cooch17@nospamverizon.net:
> Greetings -


> While I can use AllowUsers in sshd_config to control which users with
> valid accounts can access one of my boxes via ssh, I'm wondering if
> there is a way to specify a list of ip addresses which are allowed to
> access sshd? I've searched around a bit, but didn't find anything that
> looked like what I've described.


Use/compile a sshd version with tcp_wrapper support enabled and
try 'man 5 hosts_access' for setup.

Alternatively or/and in addition fire up iptables and allow access
to port 22 only to the system you want.

Good luck

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 148: Insert coin for new game
Reply With Quote
  #3 (permalink)  
Old 03-27-2005
cooch17@NOSPAMverizon.net
 
Posts: n/a
Default Re: ip access control | sshd_config

On Sat, 26 Mar 2005 00:48:51 +0100, Michael Heiming
<michael+USENET@www.heiming.de> wrote:

>In comp.os.linux.security cooch17@nospamverizon.net:
>> Greetings -

>
>> While I can use AllowUsers in sshd_config to control which users with
>> valid accounts can access one of my boxes via ssh, I'm wondering if
>> there is a way to specify a list of ip addresses which are allowed to
>> access sshd? I've searched around a bit, but didn't find anything that
>> looked like what I've described.

>
>Use/compile a sshd version with tcp_wrapper support enabled and
>try 'man 5 hosts_access' for setup.
>
>Alternatively or/and in addition fire up iptables and allow access
>to port 22 only to the system you want.
>


That does the trick - plus not allowing root access to sshd. Most of
the time, the script kiddies are trying to burrow in by guessing a
username on the system. root is about the only one you know is on any
system, so no t allowing root to access sshd minimizes that problem.

Question though -

if I restrict access to a certain ip in access.allow, then what
advantage is there in also setting up what looks to be essentially the
same thing in iptables? I'm embarassed to admit I've always puzzled
over things such as this...

Thanks...
Reply With Quote
  #4 (permalink)  
Old 03-27-2005
Michael Heiming
 
Posts: n/a
Default Re: ip access control | sshd_config

In comp.os.linux.security cooch17@nospamverizon.net:
> On Sat, 26 Mar 2005 00:48:51 +0100, Michael Heiming
> <michael+USENET@www.heiming.de> wrote:
>>In comp.os.linux.security cooch17@nospamverizon.net:


[ restricting ssh access through tcp_wrapper or/and iptables ]

> That does the trick - plus not allowing root access to sshd.
> Most of


Yep, root access to ssh should be disabled for serious usage.

[..]

> Question though -


> if I restrict access to a certain ip in access.allow, then what
> advantage is there in also setting up what looks to be
> essentially the
> same thing in iptables? I'm embarassed to admit I've always
> puzzled
> over things such as this...


Security is like an onion, if you have at least 2 layers
tcp_wrapper and iptables, you are still secure even if one fails
for misconfiguration or whatever reason.

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 88: Boss' kid fucked up the machine
Reply With Quote
  #5 (permalink)  
Old 03-28-2005
cooch17@NOSPAMverizon.net
 
Posts: n/a
Default Re: ip access control | sshd_config


>
>> if I restrict access to a certain ip in access.allow, then what
>> advantage is there in also setting up what looks to be
>> essentially the
>> same thing in iptables? I'm embarassed to admit I've always
>> puzzled
>> over things such as this...

>
>Security is like an onion, if you have at least 2 layers
>tcp_wrapper and iptables, you are still secure even if one fails
>for misconfiguration or whatever reason.



Sounds like sage advice. Thanks...
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:58 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0