Results 1 to 14 of 14

Thread: [HowTo] ssh to wl-500g under corporate proxy

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2004
    Location
    Adelaide, Australia
    Posts
    88
    Quote Originally Posted by kiewer
    3. Change (add) iptables rules to redirect all incoming on port 443 traffic to port 22.
    An easier way to do this is to tell dropbear to listen on both port 22 and port 443 (using the "-p 22 -p 443" command line switches), and then just open the firewall to accept connections from the WAN on port 443.

    -- Rod

  2. #2
    Quote Originally Posted by rwhitby
    An easier way to do this is to tell dropbear to listen on both port 22 and port 443 (using the "-p 22 -p 443" command line switches), and then just open the firewall to accept connections from the WAN on port 443.

    -- Rod
    I don't understand. Why don't just listen to port 22 and modify the INPUT chain to accept connection from the WAN on port 22 ? Why must we bother with port 443 at all ?

    Cheers

  3. #3
    Join Date
    Apr 2004
    Location
    Adelaide, Australia
    Posts
    88
    Quote Originally Posted by mctiew
    I don't understand. Why don't just listen to port 22 and modify the INPUT chain to accept connection from the WAN on port 22 ? Why must we bother with port 443 at all ?

    Cheers
    Corporate proxies often don't pass port 22, but do pass port 443 (for HTTPS traffic). That's what this thread is all about, right?

    So people want external access to be on port 443, but LAN access to still be on port 22.

    -- Rod

  4. #4
    Quote Originally Posted by rwhitby
    Corporate proxies often don't pass port 22, but do pass port 443 (for HTTPS traffic). That's what this thread is all about, right?

    So people want external access to be on port 443, but LAN access to still be on port 22.

    -- Rod
    That's being the case why pick 443 ? Should just pick a big obscure number instead of 443, example 22443.

    Cheers

  5. #5
    Join Date
    Apr 2004
    Location
    Adelaide, Australia
    Posts
    88
    Quote Originally Posted by mctiew
    That's being the case why pick 443 ? Should just pick a big obscure number instead of 443, example 22443.

    Cheers
    Because usually port 80 and port 443 is *all* that the corporate firewall proxy passes.

    -- Rod

  6. #6
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    16
    Quote Originally Posted by rwhitby
    An easier way to do this is to tell dropbear to listen on both port 22 and port 443 (using the "-p 22 -p 443" command line switches), and then just open the firewall to accept connections from the WAN on port 443.

    -- Rod
    Just didn't know that. Thanks.

  7. #7
    So if I understand correctly, this approach would create a SSH-"tunnel" from a client pc in the corporate LAN, through port 443 (designated to traverse HTTPS connections) into the WL500G router, using PuTTY (or alike).

    Now I wonder: I have read several statements that you can use a SSH-"tunnel" to route VNC traffic.

    If I want to use a tunnel to a pc at home (192.168.1.15) which is running behind my WL-500G router (192.168.1.1), would I need to apply something like this in post-firewall?:

    Code:
    iptables -D INPUT -j DROP
    iptables -A INPUT -p tcp -m tcp -d 192.168.1.1 --dport 22 -j ACCEPT
    iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 443 -j DNAT --to-destination 192.168.1.15:22
    iptables -A INPUT -j DROP
    How can I use VNC to connect to a remote pc behind the WL-500G router, using a SSH-"tunnel" that is opened with PuTTY?

  8. #8
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    16
    Quote Originally Posted by ikerstges
    So if I understand correctly, this approach would create a SSH-"tunnel" from a client pc in the corporate LAN, through port 443 (designated to traverse HTTPS connections) into the WL500G router, using PuTTY (or alike).
    No it doesn't create a ssh-tunnel. This is a simple port redirection. Unfortunatly I can't explain more about ssh-tunnel, because never did it.

  9. #9
    Join Date
    Feb 2004
    Posts
    103
    The tunneling is very easy. but not done on the router side, but on the client side.

    In putty (ssh client) go to the SSH->Tunnel tab

    the source port is the port you want to connect to locally

    so in your case you want to do
    sourceport: 5900
    destination: 192.168.1.15:5900
    if you run vnc on a different port than 'display:0' than the 5900 becomes more
    e.g. display 3=port5903
    Last edited by erik_bies; 11-02-2006 at 01:07.

  10. #10
    I hope somebody will please bare with me here?!..

    I connect from the corporate office to my home LAN.

    I Am able to SSH to my wl500g now. For that, I have changed my post-firewall so it forwards WAN connections that are coming in on port 443 to port 22 for SSH.

    To SSH to the wl500g, I enter in PuTTY:
    Connection/Proxy: HTTP with corporate browser proxy name and portnumber.
    Session: Protocol=SSH, Host name=TestMyLogin.dyndns.org and Port=443

    This opens the connection and I'm able to enter username and password.

    Now I try to enter the tunnels information as informed in previous post for a VNC connection to a pc in my home LAN. I have entered:
    Connection/SSH/Tunnels: Source port= 5900, Destination= 192.168.1.15:22:5900.
    I clicked on 'add' to add this tunnel information to the PuTTY session. With this added tunnel to the session, I'm able to login on my wl500g.

    But now:
    I run VNC-viewer and try to open a connection to 'localhost', but this gives a timeout. I also tried run VNC-viewer and open a connection to TestMyLogin.dyndns.org (as I'm not sure how to understand this connection over SSH-tunnel) and again: timeout. GRRRrrrr....

    Do I need to change the tunnel-destination to run on 443 instead of 22 in the Connection/SSH/Tunnels in PuTTY?
    To what host do I connect VNC-viewer when running a connection over the ssh-tunnel?
    Last edited by ikerstges; 08-02-2006 at 08:14.

  11. #11
    Google is my best friend, I got it working..

    The tunnel setup in PuTTY needs to be set as: Source port= 5900, Destination= 192.168.1.15:5900 and have VNC-viewer connect to localhost on my pc at the corporate network.

    (Mind: without the :22 that I had in previous posts!)

    I'm a happy camper now!

Similar Threads

  1. HOWTO use your WL-500g as IPv6 router
    By phedny in forum WL-500g/WL-500gx Tutorials
    Replies: 8
    Last Post: 17-02-2008, 07:19
  2. sip proxy
    By Lionking in forum WL-500g Custom Development
    Replies: 23
    Last Post: 02-07-2005, 09:22
  3. [wish] Proxy / tor
    By jago25_98 in forum WL-500g Custom Development
    Replies: 0
    Last Post: 07-05-2005, 11:41
  4. Using WL-500g as a proxy
    By RCR in forum WL-500g Custom Development
    Replies: 9
    Last Post: 26-02-2005, 01:46
  5. wl-500 and proxy server
    By albi in forum WL-500g Custom Development
    Replies: 0
    Last Post: 05-06-2004, 19:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •