3

System

  • Ubuntu 15.10 Wily
  • Desktop Environment: GNOME Shell 3.16.4
  • VPN: Astrill v2.9.3

Problem

I live in China. Without a VPN, I can't access many sites, including Google, Facebook, etc. Thus, I have bought the Astrill VPN and installed it on my computer.

The VPN works perfectly, at least on my browsers. I can access Facebook, Google, and other sites available in the U.S. on Firefox and Chromium. However, the terminal command line doesn't seem to know that I am on VPN and can access blocked sites in China.

For example, I can access the Google's robots.txt file by going to google.com/robots.txt on a web browser. However, when I try to download the file via the command line by typing:

wget https://www.google.com/robots.txt

It just gets stuck there. I also tried writing a simple Python script with urllib2.urlopen() on a url and every blocked url I tried it on gave me a:

urlopen error [Errno 110] Connection timed out>

This made me believe that the terminal command line simply doesn't recognize I have my VPN on and that I am making the wget request from my actual ip address from China.

I always thought that VPN is a proxy that is applied system-wide, and so I thought that the terminal command line would believe that I am not in China anymore. Turns out I might be wrong and misinformed.

What can be done?

Edit:

I installed some applications that will look up the geolocation of an IP address:

sudo apt-get install geoip-bin geoip-database.

I got my IP address recognized by the command line by running hostname -I.

So I tried to look up my geolocation by running: geoiplookup $(hostname -I)

The output? GeoIP Country Edition: IP Address not found

I tried inputting the same IP address with some web apps on my browser and as expected, no luck.

2

1 Answer 1

2

Well, I found out the problem.

Turns out I was using my Astrill VPN configured as OpenWeb. This means that the VPN is only tunnelled via web browsers and whatnot.

I then changed my configuration to OpenVPN, which means "it has advanced split routing/split tunnelling features and can tunnel all applications on your computer." All applications meaning web browsers, and everything else including the terminal command-line. Now all my requests from the command-line are made through the VPN tunnel, and I am a happy man.

I guess the OpenVPN configuration is the "system-wide proxy" that I always thought would be the configuration of all VPNs. Using OpenWeb previously explains why I can only access China's blocked sites from the web.

If you'd like to know more about the difference between VPN protocols - here's what Astrill has to say, but I don't know if this is applicable to all VPNs. However, I'd imagine their explanations to vary only slightly.

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.