My home PC is behind NAT but my router has static ip address. My work PC uses 3G stick for Internet (So I guess it is like being behind NAT).
I would like to create a reverse SSH-tunnel to connect to my work PC. Following lots of manuals I create a tunnel on my work PC:
ssh -R 33333:localhost:22 [email protected]
Where 135.142.205.131
is my router's static IP address.
When trying to connect to work from home I isssue:
ssh -p 33333 localhost
But I get "connection refused". I think I need to configure some port forwarding because I think I need to somehow make ssh let me connect some local port to my router's 33333 port to make the tunnel work. How do I do it?
Output at my work PC:
netstat -nap --inet --tcp
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:56789 0.0.0.0:* LISTEN 1402/klient
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 10.0.85.14:56731 104.20.90.217:443 ESTABLISHED 1402/klient
tcp 0 1 10.0.85.14:52501 135.142.205.131:22 SYN_SENT 2366/ssh
tcp 0 0 10.0.85.14:56789 52.49.10.125:53633 ESTABLISHED 1402/klient
tcp 0 0 10.0.85.14:47118 104.20.89.217:443 ESTABLISHED 1402/klient
Output of netstat - output
at my works PC:
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 10.0.85.14:56731 104.20.90.217:https ESTABLISHED
tcp 0 1 10.0.85.14:52501 135.142.205.131:ssh SYN_SENT
tcp 0 0 10.0.85.14:56789 ec2-52-49-10-125.:53633 ESTABLISHED
tcp 0 0 10.0.85.14:47118 104.20.89.217:https ESTABLISHED