why is tunnel blocked for privileged ports?
From: Carlos Carvalho (carlos_at_fisica.ufpr.br)
Date: 01/08/04
- Previous message: Brown, Renetta: "upgrading"
- Next in thread: Eloi Granado: "Re: why is tunnel blocked for privileged ports?"
- Reply: Eloi Granado: "Re: why is tunnel blocked for privileged ports?"
- Reply: Joe Smith: "Re: why is tunnel blocked for privileged ports?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 8 Jan 2004 02:43:46 -0200 To: secureshell@securityfocus.com
Hi folks,
I'm trying to allow users have access to pop and smtp services via a
ssh tunnel in ssh.com 3.2.3. I have this in sshd2_config:
# AllowX11Forwarding yes
AllowTcpForwarding yes
ForwardACL deny remote .* .*
ForwardACL allow local .* localhost%110
ForwardACL allow local .* localhost%25
Users usually connect via ssh.com's window client with the tunnel
created with the following:
Menu Edit -> Settings -> Profile Settings -> Tunneling -> Outgoing.
Click Add. In "Display Name" put smtp. In "ListenPort" put 25. In
"Destination Host" use fisica.ufpr.br, and for "Destination Port" use
25
There's an analogous setting for pop3.
However tunneling is being denied by sshd on the server because normal
users are trying to tunnel to a privileged port. This restriction
isn't mentioned in the manual but looking at the source we have this
in sshchtcpfwd.c around line 1288:
/* If user is not logged in as a privileged user, don't allow
forwarding of privileged ports. */
if (port < 1024)
{
if (ssh_user_uid(common->user_data))
{
ssh_warning("User \"%s\" not root, tried to forward privileged "
"port %ld.", ssh_user_name(common->user_data),
(unsigned long) port);
SEND_FAILURE;
}
I don't understand the reason for this restriction. I thought a
tunnel is equivalent to being logged in locally; if users have access
to these ports why cannot they do it coming through ssh? In fact the
only reason for configuring this on the system server is exactly to be
able to reach these ports, otherwise users could install their own
forwarders in other ports without administrator intervention.
I'm probably missing something obvious... How can I do it?
- Previous message: Brown, Renetta: "upgrading"
- Next in thread: Eloi Granado: "Re: why is tunnel blocked for privileged ports?"
- Reply: Eloi Granado: "Re: why is tunnel blocked for privileged ports?"
- Reply: Joe Smith: "Re: why is tunnel blocked for privileged ports?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|