You are not logged in.

#1 2014-09-07 17:07:01

nobody44
Member
Registered: 2011-08-25
Posts: 29

OpenVPN and hostnames

Hello,

I am trying to setup a VPN with OpenVPN, and here is basically what I want:

I have a server, that runs several services (webserver with owncloud and gitlab, and some others, OpenVPN runs on this server as well), and I want those services to be available from inside the VPN.
This works with IP addresses, but I want to work with hostnames (10.8.0.1 just looks ugly, I want something like "raspi.vpn").

The server is available under the IP address 10.8.0.1 and shall be available under raspi.vpn.

In order to accomplish that, I could:

* create a static hosts entry for all clients (using /etc/hosts), which is managable, but ugly IMHO
* run a DNS server

I don't doubt that the first approach will work, so I tried the second one as well. I setup bind, which runs on the server, I configured the clients to use the DNS server inside the VPN, which works as well.
But: *Every* DNS lookup (even ebay.com) goes through the VPN. The server is slow (it's a Raspberry Pi) and I would like to avoid that. So how can I tell my clients to use the DNS inside the VPN for hosts in "*.vpn" only.

Is it possible to push the servers /etc/hosts file to the clients? So that I don't have to configure *every* client just the host once?
Is there any other way I didn't think of in order to accomplish what I want?

Thank you very much!

nobody44

Offline

Board footer

Powered by FluxBB