Using the -g flag, gives an error, e.g.: hnassrat@HNASSRAT-LNX1 ~> ssh -vgL 9000:localhost:9000 hatem@nassrat [...] debug1: Local connections to *:9000 forwarded to remote address localhost:9000 debug1: Local forwarding listening on 0.0.0.0 port 9000. debug1: channel 0: new [port listener] debug1: Local forwarding listening on :: port 9000. bind: Address already in use I am not sure if this issue is specific to linux and thus a bug in linux network config, but when it bound to 0.0.0.0 it listens to all interfaces then trying to listen to the ipv6 interface causes it to say bind address already in use. In this case (OpenSSH_5.3p1 Debian-3ubuntu3, OpenSSL 0.9.8k 25 Mar 2009) the error is useless, however with a machine running OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 it binds to ipv6 first. In any case the workaround I used, thanks to ssh being awesome and having cool features, is to use the command as follows: hnassrat@HNASSRAT-LNX1 ~> ssh -4gL 9000:localhost:9000 hatem@nassrat This maybe another side-effect, but although I specified only listen on ipv4, i would think it will probably listen on all interfaces (thats probably not an ssh bug though).
Created attachment 1883 [details] v6only.diff Please try this patch.
ping - have you had a chance to try the patch I supplied?