Carlos Colaço edited this page Jun 24, 2018 · 9 revisions

FAQ (Frequently Asked Questions)

What boards/OSes does PiVPN support?

PiVPN runs at least on the following boards:

  • Raspberry Pi 1/2/3 running Raspbian Jessie, Raspbian Jessie Lite.
  • All SBC's running DietPi. This is currently: Raspberry Pi's (all models), Odroid C1, Odroid C2 (arm64), Odroid XU3/4, Pine A64, NanoPi NEO, NanoPi NEO Air, NanoPi M1, NanoPi M2/T2, NanoPi M3/T3, Banana Pi Pro Banana Pi M2+, OrangePi PC and OrangePi One
  • Most servers running a Debian or Ubuntu based distro.

Can I change the hostname, the IP address, protocol or port after the install?

Yes. To change the hostname or IP address, you will need to change /etc/openvpn/easy-rsa/pki/Default.txt and your .ovpn files if you have already generated them.

My ISP doesn't give me a static external IP address, so my servers IP address keeps changing!

You will need a dynamic DNS service and a hostname. If your IP address changes, your hostname will then automatically point to the new IP address. Some free dynamic DNS services are or

Installing with pi-hole

You can safely install pivpn on the same raspberry pi as your pi-hole install. If you point your openvpn clients to the IP of your pi-hole for DNS (so they get ad blocking etc) then you will want to be sure to edit your /etc/dnsmasq.conf file too allow dns resolution from the vpn interface. look for this line: listen-address=,, Note your listen-address may just contain, the next IP should be the local IP of your pi-hole and the final IP, is the PiVPN vpn interface. If you set this and have your vpn clients use (in my example) as their DNS then you will get ad blocking over your VPN connections.

Allow Clients to connect but block their access to the internet

If you don't want your VPN clients to be able to access the internet simply comment the following line in /etc/openvpn/server.con

push "redirect-gateway def1"

How Can I Migrate my configs to another PiVPN Instance?

you can achieve that by copying your /etc/openvpn folder to your new Raspberry pi, one method that works is using scp.


scp -pr /etc/openvpn/ root@

How to resolve local hostnames?

to resolve local hostnames all you have to do is to use your router as DNS Server instead of using other public DNS providers. If you have already a working installation of OpenVPN, all you need to do is to edit /etc/openvpn/server.conf and change the following line:

#Assuming your router IP address is
push "dhcp-option DNS"

Alternatively you can change /etc/hosts file and add <IPAddress> <hostname> Example:   JohnDoeRouter	JohnDoePC	JaneDoePC   CatPC   DogPC
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.