Jump to content
Not connected, Your IP: 18.218.61.16
5o52xwmftthyuq2gmdy6

Pi-Hole on a Linux box using /usr/sbin/openvpn for AirVPN

Recommended Posts

I have a Linux box that is in "always-on" mode to AirVPN using command line /usr/sbin/openvpn with downloaded configs from AirVPN.

If I want to run pi-hole on this same machine (I've never run it before), is the process:
* Run pi-hole
* point my router's DNS settings to this machine
* point pi-hole to openDNS (or whatever)
* everything in my house now uses my-router -> pi-hole -> openDNS

Is that understanding correct?

If so, is doing this in this fashion going to send all my house's DNS queries through the openvpn tunnel through airVPN to openDNS?   or is my understanding wrong there somehow?
My brain is a little bent around the axle because my Linux box is also connected to that router, so the path then becomes:  client -> wifiAP/Router -> LinuxPiHole -> (tunnel) -> Router again? -> AirVPN -> openDNS...  is that right?  Will that work?

Share this post


Link to post
8 hours ago, 5o52xwmftthyuq2gmdy6 said:

* everything in my house now uses my-router -> pi-hole -> openDNS


Not now. All devices first must get the new DNS server from the router (reconnect to the router, or wait for a DHCP release).
 
8 hours ago, 5o52xwmftthyuq2gmdy6 said:

If so, is doing this in this fashion going to send all my house's DNS queries through the openvpn tunnel through airVPN to openDNS?


Yes – all traffic is routed through AirVPN, DNS as well.
 
8 hours ago, 5o52xwmftthyuq2gmdy6 said:

My brain is a little bent around the axle because my Linux box is also connected to that router, so the path then becomes:  client -> wifiAP/Router -> LinuxPiHole -> (tunnel) -> Router again? -> AirVPN -> openDNS...  is that right?  Will that work?


Host > Pi-Hole > tunnel/AirVPN server > OpenDNS. Remember that the devices get Pi-Hole as their DNS server from the router. All queries go to the Pi from then on, and from there to whatever you configure. You can also configure the router there.

Also, don't use OpenDNS. They block and log. Try OpenNIC.

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post

 

18 hours ago, 5o52xwmftthyuq2gmdy6 said:

If so, is doing this in this fashion going to send all my house's DNS queries through the openvpn tunnel through airVPN to openDNS?   or is my understanding wrong there somehow?
My brain is a little bent around the axle because my Linux box is also connected to that router, so the path then becomes:  client -> wifiAP/Router -> LinuxPiHole -> (tunnel) -> Router again? -> AirVPN -> openDNS...  is that right?  Will that work?


I've had exactly this set up working for months. The way I set it up is as follows:
1) run the openvpn with your config file
2) run the pi-hole installer and select the tun0 interface - select default options for the ip address of the pi-hole server
3) open the pi-hole web on localhost/admin and set its DNS addresses to those of the internal vpn servers (10.4.0.1)
4) check that it works (open the pi-hole web on localhost/admin) - you will note you're not getting all your local traffic
5) to get your local traffic, run the pi-hole installer again but this time chose the interface with your lan traffic on it, not the tun0
6) when you open the pi-hole web again, you'll see it all working

The finished setup looks like this on my machine:

1869174144_Screenshotfrom2020-05-2320-16-18.png.4bdc19be566d1f0dea75793a1f62ceba.png
note the IPv4 address is the address of the airvpn server on tun0 generated by pi-hole with its default settings, but the ethernet interface is enp3s0, the interface of my lan. This reflects the 'double installation'

1019504810_Screenshotfrom2020-05-2320-16-31.png.67ad7a92c9c3e533c01474587798107e.png

10.4.0.1 and 10.5.0.1 are the addresses of airvpn's dns servers on tun0 - these are the addresses the clients on your lan should be using.





 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...