Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to access and browse internet through a ssh server so in my laptop (ubuntu 12.04) I do this:

ssh -D 9999 root@server-ip

then in the network proxy in my laptop I set:

HTTP proxy 127.0.0.1      port 9999

but when I try to open a page in my browser it doesn't connect and in my terminal I get errors like these :

channel 4: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 4: open failed: connect failed: Connection refused
channel 6: open failed: connect failed: Connection refused

I'm new to this and found this method on the internet so I'm don't know what I'm doing wrong. I'd really appreciate it if anyone can help me make this work.

share|improve this question

migrated from serverfault.com Aug 1 '13 at 17:09

This question came from our site for professional system and network administrators.

    
Note that -D does not create an HTTP proxy, it creates a SOCKS5 proxy...so make sure you configure your browser correctly (e.g., as described here. –  larsks Aug 1 '13 at 17:24
    
oh! thank you it worked. I was setting http proxy instead of socks host. –  soroosh.strife Aug 1 '13 at 17:28
    
@larsks you seem tohave solved this, care to post it as an answer? –  terdon Aug 1 '13 at 18:00
    
I've gone ahead and posted it as an answer. Cheers! –  larsks Aug 1 '13 at 18:16
add comment

1 Answer 1

The -D option does not creates an HTTP proxy. It creates a SOCKS5 proxy:

 -D [bind_address:]port
         Specifies a local “dynamic” application-level port forwarding....Currently the SOCKS4 and SOCKS5 protocols are sup‐
         ported, and ssh will act as a SOCKS server.

In order to use the proxy you will need to configure Firefox to use a SOCKS5 proxy as described in this document.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.