Remote port forwarding - only listen on IPv4
Andreas B <[email protected]>
| Newsgroups | gmane.linux.debian.devel.ssh |
|---|---|
| Message-ID | <CAL2+-iXec9WgsFLOm65iux3QTaoQRd1HD=5N82REoEN8AXzzpg@mail.gmail.com> |
I'm using remote port forwarding, and only want to forward the IPv4-address. My command: $ ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -o "StrictHostKeyChecking no" -N -p22 -R20000:localhost:22 myserver I've used 'localhost' (as above), '127.0.0.1' and '*' in an attempt to figure this out, but both IPv4 and IPv6 are always forwarded. Example: What I have: $ ss -tuln Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* tcp LISTEN 0 128 0.0.0.0:20000 0.0.0.0:* tcp LISTEN 0 128 [::]:20000 [::]:* What I want: $ ss -tuln Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* tcp LISTEN 0 128 0.0.0.0:20000 0.0.0.0:* Thanks for any hints. Andreas