PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.security.ssh > allow login from specific address
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.security.ssh SSH secure remote login and tunneling tools.

allow login from specific address

Réponse
 
LinkBack Outils de la discussion
Vieux 20/09/2006, 09h36   #1
Sylvain Ferriol
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut allow login from specific address

hello

i want to config a ssh gateway between internet and my intranet:
the specifications are:
- a user from internet can not login the ssh_gateway
- some users (admins) from intranet can login the ssh_gateway

how can i do that ?
can i allow sshd to accept login only from an ip address range ?

is it more secure to only accept port forwarding on ssh_gateway ?

thanks

sylvain
  Réponse avec citation
Vieux 20/09/2006, 15h31   #2
Todd H.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: allow login from specific address

Sylvain Ferriol <sferriol@imag.fr> writes:

> hello
>
> i want to config a ssh gateway between internet and my intranet:
> the specifications are:
> - a user from internet can not login the ssh_gateway
> - some users (admins) from intranet can login the ssh_gateway
>
> how can i do that ?
> can i allow sshd to accept login only from an ip address range ?
>
> is it more secure to only accept port forwarding on ssh_gateway ?


TCP Wrappers rather than an sshd config is the place to do this.

THe 30 second tutorial, assuming it's installed:

edit /etc/hosts.deny
Make this the one and only line:
sshd: ALL

Or, if you want to get more restrictive and don't host external
services on the box make that:
ALL:ALL

which denies everything by default except things specifically
allowed.

Next, edit /etc/hosts.allow

Add lines
sshd: ip.address.to.allow.here
sshd: ip.address2.to.allow.here
sshd: ip.address3.to.allow.here
sshd: ip.address4.to.allow.here
sshd: intranet.mycompany.com

Man hosts.allow for more details and different ways to specify ip
ranges and subnets. If your intranet hosts reverse resolve to a
consistent name e.g. host123.intranet.mycompany.com, then sshd:
intranet.mycompany.com would be your hosts.allow entry.

Best Regards,
--
Todd H.
http://www.toddh.net/
  Réponse avec citation
Vieux 20/09/2006, 16h48   #3
Sylvain Ferriol
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: allow login from specific address

Todd H. a écrit :
> Sylvain Ferriol <sferriol@imag.fr> writes:
>
>
>>hello
>>
>>i want to config a ssh gateway between internet and my intranet:
>>the specifications are:
>>- a user from internet can not login the ssh_gateway
>>- some users (admins) from intranet can login the ssh_gateway
>>
>>how can i do that ?
>>can i allow sshd to accept login only from an ip address range ?
>>
>>is it more secure to only accept port forwarding on ssh_gateway ?

>
>
> TCP Wrappers rather than an sshd config is the place to do this.
>
> THe 30 second tutorial, assuming it's installed:
>
> edit /etc/hosts.deny
> Make this the one and only line:
> sshd: ALL


the problem is that i want to allow port forwarding from internet to
intranet like this:
ssh -N -L 4444:foo_server:4444 sshd_gateway
>
> Or, if you want to get more restrictive and don't host external
> services on the box make that:
> ALL:ALL
>
> which denies everything by default except things specifically
> allowed.
>
> Next, edit /etc/hosts.allow
>
> Add lines
> sshd: ip.address.to.allow.here
> sshd: ip.address2.to.allow.here
> sshd: ip.address3.to.allow.here
> sshd: ip.address4.to.allow.here
> sshd: intranet.mycompany.com
>
> Man hosts.allow for more details and different ways to specify ip
> ranges and subnets. If your intranet hosts reverse resolve to a
> consistent name e.g. host123.intranet.mycompany.com, then sshd:
> intranet.mycompany.com would be your hosts.allow entry.
>
> Best Regards,
> --
> Todd H.
> http://www.toddh.net/

  Réponse avec citation
Vieux 20/09/2006, 17h17   #4
Todd H.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: allow login from specific address

Sylvain Ferriol <sferriol@imag.fr> writes:

> Todd H. a écrit :
> > Sylvain Ferriol <sferriol@imag.fr> writes:
> >
> >>hello
> >>
> >>i want to config a ssh gateway between internet and my intranet:
> >>the specifications are:
> >>- a user from internet can not login the ssh_gateway
> >>- some users (admins) from intranet can login the ssh_gateway
> >>
> >>how can i do that ?
> >>can i allow sshd to accept login only from an ip address range ?
> >>
> >>is it more secure to only accept port forwarding on ssh_gateway ?

> > TCP Wrappers rather than an sshd config is the place to do this. THe
> > 30 second tutorial, assuming it's installed: edit /etc/hosts.deny
> > Make this the one and only line: sshd: ALL

>
> the problem is that i want to allow port forwarding from internet to
> intranet like this:
> ssh -N -L 4444:foo_server:4444 sshd_gateway


Are your requirements are opposed to each other?

If you want to allow a forward connection from internet to intranet on
the gateway to set up that port forwarding, you can't prohibit "a user
from internet can not login the ssh_gateway."

Or are you saying you want to allow this port forwarding, but no
interactive login shells from internet users?

--
Todd H.
http://www.toddh.net/
  Réponse avec citation
Vieux 20/09/2006, 17h40   #5
Unruh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: allow login from specific address

Sylvain Ferriol <sferriol@imag.fr> writes:

>hello


>i want to config a ssh gateway between internet and my intranet:
>the specifications are:
>- a user from internet can not login the ssh_gateway
>- some users (admins) from intranet can login the ssh_gateway


>how can i do that ?
>can i allow sshd to accept login only from an ip address range ?


Use hosts.allow and only allow from the specific address range. ssh uses
tcpwrapper.


>is it more secure to only accept port forwarding on ssh_gateway ?


>thanks


>sylvain

  Réponse avec citation
Vieux 21/09/2006, 11h28   #6
Sylvain Ferriol
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: allow login from specific address

Todd H. a écrit :
> Sylvain Ferriol <sferriol@imag.fr> writes:
>
>
>>Todd H. a écrit :
>>
>>>Sylvain Ferriol <sferriol@imag.fr> writes:
>>>
>>>
>>>>hello
>>>>
>>>>i want to config a ssh gateway between internet and my intranet:
>>>>the specifications are:
>>>>- a user from internet can not login the ssh_gateway
>>>>- some users (admins) from intranet can login the ssh_gateway
>>>>
>>>>how can i do that ?
>>>>can i allow sshd to accept login only from an ip address range ?
>>>>
>>>>is it more secure to only accept port forwarding on ssh_gateway ?
>>>
>>>TCP Wrappers rather than an sshd config is the place to do this. THe
>>>30 second tutorial, assuming it's installed: edit /etc/hosts.deny
>>>Make this the one and only line: sshd: ALL

>>
>>the problem is that i want to allow port forwarding from internet to
>>intranet like this:
>>ssh -N -L 4444:foo_server:4444 sshd_gateway

>
>
> Are your requirements are opposed to each other?
>
> If you want to allow a forward connection from internet to intranet on
> the gateway to set up that port forwarding, you can't prohibit "a user
> from internet can not login the ssh_gateway."

why ?
>
> Or are you saying you want to allow this port forwarding, but no
> interactive login shells from internet users?
>

yes
  Réponse avec citation
Vieux 26/11/2006, 12h40   #7
Darren Tucker
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: allow login from specific address

On 2006-09-21, Sylvain Ferriol <sferriol@imag.fr> wrote:
> Todd H. a écrit :

[...]
>> If you want to allow a forward connection from internet to intranet on
>> the gateway to set up that port forwarding, you can't prohibit "a user
>> from internet can not login the ssh_gateway."

> why ?
>>
>> Or are you saying you want to allow this port forwarding, but no
>> interactive login shells from internet users?
>>

> yes


There's a couple of new features in OpenSSH 4.4 (and newer) that could
here: "PermitOpen" which controls which portforwards are allowed and
"Match" which can apply those restrictions to a subset of connections.

So assuming your local net is 192.168.0.0/24 and you wanted to allow any
commands or forwards from connections originating from it, this would
be something like

Match Address 192.168.0.*
PermitOpen any

Match Address *
PermitOpen 1.2.3.4:44444

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h48.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16894 seconds with 15 queries