I had some trouble to establish a connection with a VPN server. Here is a link to the concerned thread: StackExchange VPN connection.It was mainly a DNS issue and it works now. However, I can now resolve some names, but not all of them. I can resolve www.google.com, but not torrent.ubuntu.com for example. Even if I use the command dig to specify the DNS I want to use, I can't resolve torrent.ubuntu.com while connected to the VPN. When I'm not connected to the VPN, I can resolve it, and I can also resolve it by using the DNS of my VPN server.Not connected to VPN (84.200.69.80 is the DNS address given by my VPN server):pi@raspberrypi:/etc/openvpn/vpnbook $ dig torrent.ubuntu.com; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> torrent.ubuntu.com;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12612;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 512;; QUESTION SECTION:;torrent.ubuntu.com.            IN      A;; ANSWER SECTION:torrent.ubuntu.com.     600     IN      A       91.189.95.21;; Query time: 26 msec;; SERVER: 194.168.4.100#53(194.168.4.100);; WHEN: Tue Mar 28 23:36:14 UTC 2017;; MSG SIZE  rcvd: 63pi@raspberrypi:/etc/openvpn/vpnbook $ dig @8.8.8.8 torrent.ubuntu.com; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> @8.8.8.8 torrent.ubuntu.com; (1 server found);; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54658;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 512;; QUESTION SECTION:;torrent.ubuntu.com.            IN      A;; ANSWER SECTION:torrent.ubuntu.com.     565     IN      A       91.189.95.21;; Query time: 38 msec;; SERVER: 8.8.8.8#53(8.8.8.8);; WHEN: Tue Mar 28 23:36:30 UTC 2017;; MSG SIZE  rcvd: 63pi@raspberrypi:/etc/openvpn/vpnbook $ dig @84.200.69.80 torrent.ubuntu.com; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> @84.200.69.80 torrent.ubuntu.com; (1 server found);; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25789;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;torrent.ubuntu.com.            IN      A;; ANSWER SECTION:torrent.ubuntu.com.     153     IN      A       91.189.95.21;; AUTHORITY SECTION:ubuntu.com.             600     IN      NS      ns4.p27.dynect.net.ubuntu.com.             600     IN      NS      ns2.p27.dynect.net.ubuntu.com.             600     IN      NS      ns1.p27.dynect.net.ubuntu.com.             600     IN      NS      ns3.p27.dynect.net.;; Query time: 48 msec;; SERVER: 84.200.69.80#53(84.200.69.80);; WHEN: Tue Mar 28 23:36:47 UTC 2017;; MSG SIZE  rcvd: 149Connected to the VPN:pi@raspberrypi:/etc/openvpn/vpnbook $ dig torrent.ubuntu.com; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> torrent.ubuntu.com;; global options: +cmd;; connection timed out; no servers could be reachedpi@raspberrypi:/etc/openvpn/vpnbook $ dig @84.200.69.80 torrent.ubuntu.com; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> @84.200.69.80 torrent.ubuntu.com; (1 server found);; global options: +cmd;; connection timed out; no servers could be reachedpi@raspberrypi:/etc/openvpn/vpnbook $ dig @8.8.8.8 torrent.ubuntu.com; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> @8.8.8.8 torrent.ubuntu.com; (1 server found);; global options: +cmd;; connection timed out; no servers could be reachedpi@raspberrypi:/etc/openvpn/vpnbook $ dig www.google.com; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> www.google.com;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59828;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;www.google.com.                        IN      A;; ANSWER SECTION:www.google.com.         132     IN      A       172.217.20.196;; Query time: 211 msec;; SERVER: 84.200.69.80#53(84.200.69.80);; WHEN: Tue Mar 28 23:38:58 UTC 2017;; MSG SIZE  rcvd: 59
Can't resolve all names once connected to a VPN
linux;dns;raspbian;openvpn;vpn
After surfing a bit on internet, it seems pretty obvious that the VPN server is blocking every DNS request which contains the word torrent, even if it's a legal torrent like torrent.ubuntu.com.