- Ubuntu 15.10 Wily
- Desktop Environment: GNOME Shell 3.16.4
- VPN: Astrill v2.9.3
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:
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?
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
So I tried to look up my geolocation by running:
geoiplookup $(hostname -I)
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.