4

I used to have a successful configuration in my local computer to access a remote host's web server via SSH SOCKS proxy, by typing in Firefox localhost:5000 for example. I created a rule in the server's firewall to only allow local access to this application.

I haven't used it for a while and in the meantime I updated my local computer to Ubuntu 18.10. And now that setup is not working anymore. 127.0.0.1:5000 doesn't work either.

The SOCKS setup is actually working - I can see the browser detecting the local IP to be the remote server's and I can browse the Internet normally through the SOCKS proxy. I can in fact access the remote web server by pointing Firefox to the server's external_ip:5000 (let's say http://180.129.54.204:5000). At the same time, using the same external_ip:5000 from a different browser program (Chromium) that is configured to connect directly, the result is a connection error, as expected.

When establishing the SSH connection with the -vvv flag, I see activity every time I open a webpage, but when trying to open localhost:5000 nothing happens, as if the request is not even reaching the SSH connection.

If I set the port wrong and point the browser to access external_ip:5000, I get the error page 'The proxy server is refusing connections'. On the other hand, when trying to access localhost:5000 whatever the config I only see 'Unable to connect'.

I checked several times, in Firefox's network configuration the field for 'No proxy for' is empty. enter image description here

I also tried to configure Chromium to use the SOCKS proxy instead of Firefox, but the result is the same. Also double checked 'no proxy for' to be empty in this case.

My local /etc/hosts

127.0.0.1   localhost
127.0.1.1   My_computer_name

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I don't know what changed in my system. Is anyone able to point out the problem or at least indicate log files I should be monitoring and where to look for clues?

2

Change network.proxy.allow_hijacking_localhost to true in about:settings.

| improve this answer | |
  • This is the solution for Firefox. – user2066480 Apr 14 at 19:13
0

I've encountered the same problem and I've solved it by using chrome with the --proxy-bypass-list option set like this:

google-chrome --proxy-server=socks://127.0.0.1:9999 --proxy-bypass-list='<-loopback>'

I found this solution here:

https://superuser.com/questions/1441133/google-chrome-ignorning-localhost-for-socks5-proxy

| improve this answer | |
0

Have you tried filling in the HTTP Proxy field too?

I noticed when utilizing one of my VPS IPs to tunnel through this field was filled in too, along with socks. I did, however, check my visible public IP and it did indeed show my VPSs IP.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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