5

I live in a place where Google/Facebook/Twitter and a few other websites are not available from accessing. OpenVPN is a great tool to overcome this.

Originally, I must have OpenVPN running all the time in order to be able to have an uninterruptible access to the above listed sites, but the problem is that having all my traffic go through VPN, some websites(local to my country) would be too slow. Later on, I learned that split tunneling could be utilized so that only specific websites go through the VPN, and all other traffic would go through the local network.

However, until now, I am only able to do this using IP address as follows:

route-nopull
route 1.2.3.4

I'd have to specify hosts entries to map ip address to hostnames. But the problem is, sites like google and facebook have quite a lot of IP addresses, and each of which could be used for only a specific sub-domain. This is a lot of work and hard to maintain.

From Googling, people seem to be talking about allow-pull-fqdn, which seems to be used for retrieving IP addresses from the server using the FQDN, and config is like the following:

allow-pull-fqdn
route-nopull
route google.com

in which, the ip address of google.com would be retrieved from the OpenVPN server, so that I wouldn't have to specify it locally. But so far I haven't been able to make it work, which makes me wonder if it could be used in my case after all.

The documentation on OpenVPN is not so detailed, and I haven't been able to find more information about this elsewhere, could you please point me to the right direction?

Thank you so much in advance!

4
  • Routing works on IP addresses. It is not at all concerned with DNS names. What you want can simply not be done. You need to go higher (a proxy for example) in the protocol stack, where host names are meaningful.
    – Daniel B
    Commented Sep 23, 2018 at 10:11
  • 1
    @DanielB yes I understand routing happens on network layer, what I wan to know is that if there’s mechanism in OpenVPN which could translate domain name to IP address before the routing actually happens
    – xczzhh
    Commented Sep 23, 2018 at 10:26
  • OpenVPN is not concerned with the routing process. It receives packages only after the routing decision has been made.
    – Daniel B
    Commented Sep 23, 2018 at 10:41
  • It's a lot easier to make a network namespace with OpenVPN instead of using split tunneling. Start a browser in that namespace for all your VPN pages, start a second browser in the main namespace for all your country's websites.
    – dirkt
    Commented Mar 4, 2022 at 11:13

1 Answer 1

0

Why don't you try using a netmask for the website you are looking to acess? as described here

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .