#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    7
    Rep Power
    0

    Strange SSH connection forwarding tunnel to another box..


    I'm trying to basically do something like this:

    I want to go from my web browser on my box, and set up a tunnel so that I can connect to the remote router web config through the ssh port.

    First? Is this possible? I've forwarded connections to the remote box, but not to another box on the remote network.

    The Router has port 22 forwarding to the remote box IP, but not 80.

    I tried running netcat on the "Remote Box" and forwarding it to http://192.168.2.1:80, but whenever the ssh connection would attempt it would fail.

    Code:
    My box ==> Web ==> Router ==> Remote Box
                         ^         |
      		      \_HTTP__/
    Any help out there?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Will you have a secure connection between each and every box?
    Example:
    Remote Box => rb
    Router => r
    My Box => mb

    Forward port 22 on rb to port 8022 on r
    Forward port 9022 on mb to port 8022 on r
    ...
    I have not tested these number but see if this accomplishes what you need.
    yes you can forward ports to a remote box via ssh.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    7
    Rep Power
    0
    A secure connection betwen each and every box? It isn't required, just the one from my box to the remote box. The only port I have forwarding to that box is 22 and 540 (uucp)
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    If I understand your diagram correctly you are wanting to log in to the Remote Box correct? You can either `hop` and log in from each box or you can forward the ports so that you can log in once.
    Last edited by victorpendleton; January 13th, 2004 at 09:39 AM.
    El éxito consiste en una serie de pequeñas victorias día a día

    MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    7
    Rep Power
    0
    Yes, but I can't ssh from the remote box to the router. It is only accessible through a web interface.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Are you sshing into the router or into the remote box?
    El éxito consiste en una serie de pequeñas victorias día a día

    MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    7
    Rep Power
    0
    I'm sshing into the remote box
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    If the application you are using has a web interface or a port that it listens to for web requests you can forward that port to your localhost.
    For example

    -L 80:127.0.0.1:80 ip_remote_host
    El éxito consiste en una serie de pequeñas victorias día a día

    MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html

IMN logo majestic logo threadwatch logo seochat tools logo