Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: https tunnel for ssh

  1. #1
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39

    https tunnel for ssh

    hi
    anyone tried to make a https proxy for ssh? (which is good if outgoing ssh transfer is denied, but https is working)
    maybe with a compiled proxytunnel or anything?
    thanks in advance

  2. #2
    Join Date
    Mar 2007
    Location
    Budapest / Hungary
    Posts
    79
    Hi.

    Use dropbear with -p 22 -p 443 parameters.

    Code:
    #!/bin/sh
    dropbear -p 22 -p 443
    work with port 22 (ssh) and port 443 (https).

    bye,
    George

  3. #3
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39
    thx, i never thought about a simple solution like that!
    the only question now (after I could start dropbear with these options at home) is: will the proxy let me out with putty proxy settings or not...

  4. #4
    Join Date
    Mar 2007
    Location
    Budapest / Hungary
    Posts
    79
    Hi.

    Working with ms isa server (sbs2000, isa2004) and filtered (disabled) ssh (22) port.

    bye,
    George

  5. #5
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39
    hi

    hm..
    isa here, also.
    but not working for me...

    I used the following setting in putty, under proxy:
    proxy type: http
    proxy hostname and port filled out
    username and password filled out
    didn't change the connect %host %port\n setting

    did you use any special parameters?

  6. #6
    Join Date
    Mar 2007
    Location
    Budapest / Hungary
    Posts
    79
    Hi.

    Use m$ internet explorer settings - if ie don't use proxy, the putty also no.
    Check ie connection settings.
    My router working with sbs2000: no proxy in putty and ms proxy client (firewall client) running (if needed. After sbs2003 the admin can set (in server): required/not required ms firewall/proxy client).

    bye,
    George

  7. #7
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39
    everything goes through the proxy server, no other traffic can leave the network
    any ideas with other tools like proxytunnel?

  8. #8
    I use gnu-httptunnel. Working nice.

  9. #9
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39
    thx Zheka

    I ipkg installed the gnu-httptunnel, but it's already a bit late and I'm really tired, soooo...
    Could you be please so nice to do us a bit of a sample tutorial on your hts settings, interfaces-firewall changes etc?
    If not, I have to figure it out by myself tomorrow.

  10. #10
    Quote Originally Posted by bbaccsi View Post
    thx Zheka

    I ipkg installed the gnu-httptunnel, but it's already a bit late and I'm really tired, soooo...
    Could you be please so nice to do us a bit of a sample tutorial on your hts settings, interfaces-firewall changes etc?
    If not, I have to figure it out by myself tomorrow.
    Well, but our configurations can differ a lot...
    First of all you have to start hts on router. You can use post-boot for it or create something like /opt/etc/init.d/S11tunnel
    Code:
    #!/bin/sh
    #
    # Startup script for gnu http tunnel
    #
    # Stop myself if running
    PIDFILE=/opt/var/run/hts.pid
    [ -f ${PIDFILE} ] && kill `cat ${PIDFILE}`
    killall /opt/bin/hts
    sleep 1
    /opt/bin/hts -F 127.0.0.1:22 -k 30 -M 3600 -p $PIDFILE 8888
    hts listen on port 8888 and connect to dropbear on port localhost port 22

    My router works only as access point, so port 8888 is open for accepting connections. I use d-link 2500U as router (adsl) and it forwards incoming connections on port 8888 to asus (try 80 instead of 8888 if you have very restrictive proxy at work). If you use asus as router - you have to configure firewall, cannot advise exactly...

    At work we have raptor and ntisa proxy. I downloaded gnu-httptunnel 3.3 for win. Start htc:
    Code:
    htc -F 22 --max-connection-age 2000 -B 1k -w -P <proxy address>:<proxy port> -A <username>:<password> <my static or dyndns or no-ip address>:8888
    Then run putty, connect to localhost:22 and thats it !
    My connection broke every 10-15 minutes at daytime, so I use "screen" on router to safely continue work.

    I also tryed to start hts using xinetd, but no success. I got <port is busy> or something like that ftom hts. Tell me if you manage to succeed.

    Good luck and sorry for my english.
    Zheka

  11. #11
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39
    hi

    i simply added the following line to post-boot:
    /opt/bin/hts -F 127.0.0.1:22 -k 30 -M 3600 -p /opt/var/run/hts.pid 8080
    (and it started correctly after reboot)

    to the post-firewall:
    iptables -A INPUT -p tcp --dport 80 -s xxx.xxx.xxx.xxx -j ACCEPT
    and
    iptables -t nat -A PREROUTING -i -p tcp --dport 80 -j DNAT --to-destination :8080

    i hope it's correct (i have not much experience in routing expressions) and i hope it will work tomorrow from behind the proxy.

  12. #12
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39
    not working...
    maybe i misconfigured something on the router or the firewall rules are quite restricting (towards dynamic address ranges, or who knows...)

  13. #13
    Quote Originally Posted by bbaccsi View Post
    not working...
    maybe i misconfigured something on the router or the firewall rules are quite restricting (towards dynamic address ranges, or who knows...)
    First of all try to connect using htc from home computer, without firewall.

  14. #14
    Join Date
    Sep 2006
    Location
    Hungary
    Posts
    39
    it's working from home, from my laptop i can htc my router and then ssh localhost on the laptop...
    so there has to be something at the company or my routing or whatever...

  15. #15
    Quote Originally Posted by bbaccsi View Post
    it's working from home, from my laptop i can htc my router and then ssh localhost on the laptop...
    so there has to be something at the company or my routing or whatever...
    Also try htc in debug mode at work.

Page 1 of 2 12 LastLast

Similar Threads

  1. Using a VPN Tunnel with WL-500gx
    By ben_at in forum WL-500g/WL-500gx Tutorials
    Replies: 1
    Last Post: 28-01-2007, 17:13
  2. dropbear ssh tunnel?
    By redingo in forum WL-500g Q&A
    Replies: 3
    Last Post: 16-03-2006, 11:02
  3. stunnel doesn't want to tunnel
    By hejira in forum WL-500g Q&A
    Replies: 0
    Last Post: 10-07-2005, 17:31

Tags for this Thread

Posting Permissions

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