pcm 3 Posted ... 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? 2 go558a83nk and nullstellensatz reacted to this Quote Share this post Link to post
pcm 3 Posted ... 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... Quote Share this post Link to post
pcm 3 Posted ... 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. 1 go558a83nk reacted to this Quote Share this post Link to post