sshd 4.2p1 LocalForward interface binding

Alexei Potashnik aleksey at
Wed Nov 30 12:18:54 EST 2005

There seems to be a change in the logic that sshd
uses in selecting interface to bind for LocalForward
requests from the client.

I have the following setup:

ssh client ( configured with
"LocalForward 1080"
is connecting to sshd server (

Before installing openssh-4.2p1 sshd would successfully
establish a forwarding connection for the client: ->

After installing 4.2p1, sshd still attempts to establish the
connection, but from whatever interface client connected to,
so now connection looks like this: ->

Is this a bug or a feature? If this is a feature, is there a way
to control this binding logic? GatewayPorts setting on sshd
doesn't seem to make any difference (I guess it only affects
RemoteForward commands).

Lack of this control becomes a headache, when
address is DHCP assigned and you try to enforce policy
of connections from localhost only for sockd server running

Thank you

More information about the openssh-unix-dev mailing list