Jump to content
Not connected, Your IP: 3.214.184.124

Recommended Posts

First, I apologize if this has already been addressed, but I searched the forums and how-to guides and couldn't find an answer.

I'm using pfsense with dnsmasq (DNS Forwarder).  In my General Setup, I set the DNS server to 10.4.0.1 and select AirVPN as the gateway.  Unfortunately, this doesn't seem to work as the AirVPN "gateway" is the same as my AirVPN IP address.  If I look at the route table, it adds an entry for 10.4.0.1, but sets the netif to lo0 instead of the appropriate ovpnc#, resulting in DNS queries not working.

If I set the gateway to none and manually add the route to the gateway (my AirVPN IP address with the last by replaced with .1), everything works.  Obviously, this is a routing issue, but I can't figure out how to get pfsense to correctly enter the route into the routing table.

I know I can use unbound (DNS Resolver) and that does work.  I also know that I can push AirVPN's DNS server to clients and that also works.  However, I've been using dnsmasq for the last 18+ months with a different VPN provider without any problems.  However,  I am evaluating switching to AirVPN as I like many of its other features/functions (and cost!) much better than my current VPN provider.  As of now, everything else I've setup works great with AirVPN except for this 1 annoying issue.

So...is anyone else using dnsmasq?  If so, how did you solve/workaround this routing issue?

Share this post


Link to post

Correction: pushing AirVPN's DNS server (10.4.0.1) to clients is NOT working for the same reason dnsmasq is not working - incorrect route table entry.

I also tried to use the shellcmd package to update the route table after a filter change using the following:
route -q del 10.4.0.1; set gw=`ifconfig ovpnc1 | grep "inet " | cut -d ' ' -f 4`; route -q add 10.4.0.1 "${gw}"

If I manually run the above on the pfsense box (after an AirVPN IP change), it works.  But running it via shellcmd doesn't.

So...still looking for how to get the right route added to the routing table...
 

Share this post


Link to post

Ok, looks like shellcmd does work, I just had it setup wrong.

Using:
route -q add 10.4.0.1 `ifconfig ovpnc1 | grep "inet " | cut -d ' ' -f 4`

as the command and setting it to run afterfilterchangeshellcmd updates the route table to use the correct gateway and interface if the VPN IP changes.

Hopefully, this will be of value to anyone else who has run into a similar issue.

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...