0

I'm trying to port forward from PI to my local laptop :

~/tmp$ ssh -R "192.168.0.12:8000:localhost:8000" pi@192.168.0.12
pi:~/tmp$ netstat -an|grep 8000
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN     
tcp6       0      0 ::1:8000                :::*                    LISTEN     
pi:~/tmp$

Why it's listening on 127.0.0.1:8000, instead of 192.168.0.12:8000 ?

2
  • 1
    Did you enable GatewayPorts on your sshd server? as per man page ... Specifying a remote bind_address will only succeed if the server's GatewayPorts option is enabled Feb 4 '21 at 3:18
  • @JaromandaX, that worked great, thanks !
    – Philippe
    Feb 4 '21 at 10:25
0

It has done exactly what you told it to do with the localhost, that being 127.0.0.1 on yours and ever computer like a Mac, Windows, BSD, the list goes on I would think, Android...

1
  • JaromandaX has got right answer.
    – Philippe
    Feb 7 '21 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.