In case you haven’t noticed, ALL traffic that happens on your machine after you connect with the VPN client gets rerouted through Company’s own DNS, which means whenever you’re listening to Grooveshark or watching a YouTube video, it is going through Company DNS. To avoid wasting the company resources and slowing us down, I’ve devised a way to filter our traffic so that only company-related requests go through Company DNS; everything else will go to our direct, local connection.
-
Install dnsmasq.
-
Make sure the first reference in your resolv.conf file is your local IP, that:
nameserver 127.0.0.1
Sometimes this file gets generated automatically, so changes won’t stay. In Archlinux, there is another file,
/etc/resolv.conf.head
which will always get prepended to resolv.conf, so that would work. No idea for other systems. -
Configure main dnsmasq file, like this
/etc/dnsmasq.conf
in my case: