1

My aim is to bypass ISP restrictions. In Turkey, a lot of sites are restricted (including Wikipedia). Of course there are a lot bypass methods, like buying a VPN account, using Opera with VPN, etc.

I decided to use a free and fast method. Using Google Cloud's free trial, I created a virtual machine with Ubuntu 18.04 LTS server on a USA server. I installed Squid on it and made following configs on squid.conf to allow my home network:

acl allowed_network1 src my_static_ip
http_access allow allowed_network1

After restarting the squid service on the server, I entered proxy configuration on my computer (Ubuntu Desktop 18.04 LTS) in Firefox, and I was able to go through proxy. I confirmed it with a few whatismyip sites. I can also connect to US Netflix servers.

The problem is, I can not connect to my ISP's restricted sites through a proxy. For some of them I get the ISP's restricted message (they refuse DNS lookups) and for some I just can't connect. I guess I'm missing something or totally misunderstood the idea.

Any help is appreciated in the name of a free internet.

2
  • Are you using ISP-provided DNS servers or a public server like 8.8.8.8? Dec 26 '19 at 18:17
  • Tried both. Shouldn't my browser use the DNS server of the proxy?
    – NK_
    Dec 26 '19 at 19:50
1

Seems like your ISP is intercepting proxied connections too. You'll have to encrypt the connection between your computer and the proxy server. But why reinvent the wheel? I'll give you a better alternative.

You could remove squid altogether, and use OpenSSH's dynamic forwarding feature (I assume sshd is already installed in your gcloud server, which it should be). This works by starting a local SOCKS proxy server, and forwarding any traffic to your SSH server, which in turn forwards the traffic to the destination server. As SSH connections are encrypted by default, you don't have to worry about eavesdropping/interception.

How this would work:

$ ssh -D 1080 user@gcloud-vm

would start a SOCKS proxy server on your local machine.

You can then configure whatever programs you want to use this proxy server. Just specify the proxy type as SOCKS5, proxy server IP as 127.0.0.1 and proxy server port as 1080. (Make sure to proxy DNS queries too).

If your program doesn't support proxies, then try a tool like ProxyChains or, if that doesn't work, tsocks. I've had great success with both of these.

6
  • Hi Mukesh, I executed the command on my computer, it connected to the server's shell. I entered 127.0.0.1 as proxy address with 1080 port to firefox. Wherever i go i get "Secure Connection Failed" message.
    – NK_
    Dec 26 '19 at 16:23
  • 1
    You need to enter it in the "SOCKS host" section. Leave the HTTP/S and FTP section alone. Dec 27 '19 at 5:16
  • This might help you. Dec 27 '19 at 5:24
  • Also make sure that your Cloud VM has outbound connections allowed through the firewall, at least for ports 80 and 443. Dec 27 '19 at 5:26
  • Entering on socks section and leaving the others made the trick. It works now, thank you very much Mukesh, appreciated.
    – NK_
    Dec 27 '19 at 10:10

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.