User Tools

Site Tools


admin:reverse_ssh_tunneling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
admin:reverse_ssh_tunneling [2015/06/28 11:21] – add tag ryanadmin:reverse_ssh_tunneling [2015/06/30 03:42] (current) – [Solution] benishor
Line 1: Line 1:
 +===== Reverse SSH tunneling =====
 +
 ==== Problem ==== ==== Problem ====
 Say we are working on a server product which we want to expose to the internet but our current networking set-up does not grant us an external IP address. Say we are working on a server product which we want to expose to the internet but our current networking set-up does not grant us an external IP address.
Line 16: Line 18:
 ''ssh -N -T -R *:8080:192.168.50.4:8081 benny@demoscene.ro'' ''ssh -N -T -R *:8080:192.168.50.4:8081 benny@demoscene.ro''
  
-This roughly translates to: __I want sshd on demoscene.ro to listen on all interfaces on port 8080 and route all traffic that it receives to 192.168.50.4:8081 as seen from my local machine__.+The above command roughly translates to: __I want sshd on demoscene.ro to listen on all interfaces on port 8080 and route all traffic that it receives to 192.168.50.4:8081 as seen from my local machine__.
  
 The extra flags have the following meaning: The extra flags have the following meaning:
Line 32: Line 34:
 ''sshd_config'' must be edited to contain ''GatewayPorts yes'' in order for sshd to be able to listen on interfaces other than loopback. Depending on your distribution, this entry may or may be not enabled by default. ''sshd_config'' must be edited to contain ''GatewayPorts yes'' in order for sshd to be able to listen on interfaces other than loopback. Depending on your distribution, this entry may or may be not enabled by default.
  
 +Sometimes the connection might stall or drop. This is a great opportunity to try [[http://www.harding.motd.ca/autossh/|autossh]]
 {{tag>reverse ssh tunnel nix}} {{tag>reverse ssh tunnel nix}}
admin/reverse_ssh_tunneling.1435490516.txt.gz · Last modified: 2015/06/28 11:21 by ryan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki