DD-WRT blocks client computer VPN via PPPoE connection

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
milosh
DD-WRT Novice


Joined: 17 Mar 2024
Posts: 9

PostPosted: Sun Mar 24, 2024 11:41    Post subject: DD-WRT blocks client computer VPN via PPPoE connection Reply with quote
Hello,

I need advice on configuring DD-WRT to use a local DNS server through dnsmasq (and possibly SmartDNS) while allowing a client computer to establish a VPN connection.

The scenario: I have an Asus RT-AC68U with the v3.0-r55363 std (03/13/24) build. The ISP WAN connection is set to "DHCP Automatic" and works right out of the box.

I aim to set up a local DNS (and reverse proxy via Entware) for easier client management, as I have several local clients (CUPS printer, 3D printer, local NAS server, etc.) and I would like to replace their Web GUI access from IP:port to something simpler. My preference is to configure local DNS and reverse proxy within DD-WRT's dnsmasq, avoiding the need for an additional device like Raspberry Pi with Pi-hole in my home network. I've also enabled SmartDNS for DNS resolution improvements and ad-blocking, which might be contributing to the problem, but the issue persists even when SmartDNS is disabled.

Everything else functions well, but the issue arises when my work laptop needs to establish a VPN connection (PPPoE), and DD-WRT prevents it. I've tracked down that the VPN issue is tied to DNS server resolution. I can maintain my VPN connection if the VPN's DNS servers (10.0.x.x) are added to dnsmasq and the connection to VPN tunnel is established outside the dd-wrt. More specifically if my computer is already connected to VPN (established via mobile hotspot) and I just change my connection from hotspot to dd-wrt wifi, then the connection is retained. However, I can't initiate a new VPN connection directly through DD-WRT WiFi.

Strangely, I can create VPN connection even if the mobile hotspot's internet connection comes from DD-WRT WiFi (so the upstream DNS is still from DD-WRT), but this workaround doesn't work when I try to connect my laptop directly to the VPN. Anyway, the crux of the problem is the need to use the VPN's DNS servers (local 10.0.x.x addresses via VPN) to establish and maintain the VPN connection, while keeping local DNS for other devices.

I'm seeking advice on achieving a proper and reliable setup:

* Most of my WiFi clients should use dnsmasq/SmartDNS for DNS resolution.
* My work computer should connect to the same WiFi but bypass the local dnsmasq/SmartDNS to automatically establish the necessary VPN connection without any unusual workarounds or hard-coded DNS servers for my work computer in the DD-WRT router.

I've attempted to configure this using my work computer's MAC address to set the necessary DNS servers, but without much success.

What strategy should I follow? Can I establish a different VLAN for my work computer under the same WiFi connection to force it to bypass the local DNS server? If not a separate VLAN, can I achieve this with MAC address-based settings?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12922
Location: Netherlands

PostPosted: Sun Mar 24, 2024 16:15    Post subject: Reply with quote
So the VPN is running on your client and not on the router?
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
milosh
DD-WRT Novice


Joined: 17 Mar 2024
Posts: 9

PostPosted: Sun Mar 24, 2024 18:28    Post subject: Reply with quote
Yes, VPN is running on client, not in the router.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6871
Location: Romerike, Norway

PostPosted: Sun Mar 24, 2024 18:51    Post subject: Reply with quote
Have you examined the log file (/tmp/smartdns.log)for why the VPN host-name cannot be resolved.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12922
Location: Netherlands

PostPosted: Sun Mar 24, 2024 18:51    Post subject: Reply with quote
milosh wrote:
Yes, VPN is running on client, not in the router.


Well it is up to the VPN client to deal with pushed DNS servers from the company server, the router is not involved.
If it is OpenVPN you can add to the openvpn config file:
dhcp-option DNS 10.1.6.1
or add your own DNS server if the VPN client allows local access e.g.
dhcp-option DNS 192.168.1.1

Your DNSMasq and SmartDNs are not really "optimal".
SmartDNS guide is a sticky in this forum

e.g. having all-server and no-resolv in the DNSMasg options is useless
adding
server=10.1.6.2
server=10.1.18.4
also not seems to make much sense as the router does not know how to reach those servers the same for SmartDNS

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Sun Mar 24, 2024 20:34; edited 1 time in total
milosh
DD-WRT Novice


Joined: 17 Mar 2024
Posts: 9

PostPosted: Sun Mar 24, 2024 20:15    Post subject: Reply with quote
The log file /tmp/smartdns.log does not exist..
If I set
Code:
dhcp-option=option:dns-server,10.1.6.2

to dnsmasq, then syslog warns on duplicate dhcp-option 6. The behavor itself doesn't change, client cannot establish VPN connection.

The 10.1.6.2 and 10.1.18.4 are the DNS servers that VPN tunnel is using. However I don't know whether the VPN server for the client is OpenVPN or something else.
milosh
DD-WRT Novice


Joined: 17 Mar 2024
Posts: 9

PostPosted: Sun Mar 24, 2024 20:22    Post subject: Reply with quote
I do have a following line in my syslog:

Code:
daemon.warn dnsmasq-dhcp[16520]: Ignoring domain ryyk.sise for DHCP host name XY8338
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12922
Location: Netherlands

PostPosted: Sun Mar 24, 2024 20:38    Post subject: Reply with quote
milosh wrote:
The log file /tmp/smartdns.log does not exist..
If I set
Code:
dhcp-option=option:dns-server,10.1.6.2

to dnsmasq, then syslog warns on duplicate dhcp-option 6. The behavor itself doesn't change, client cannot establish VPN connection.

The 10.1.6.2 and 10.1.18.4 are the DNS servers that VPN tunnel is using. However I don't know whether the VPN server for the client is OpenVPN or something else.


The dhcp-option DNS is for the openvpn config file if your client uses openvpn.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12922
Location: Netherlands

PostPosted: Sun Mar 24, 2024 20:48    Post subject: Reply with quote
milosh wrote:
I do have a following line in my syslog:

Code:
daemon.warn dnsmasq-dhcp[16520]: Ignoring domain ryyk.sise for DHCP host name XY8338


It is just a warning, you can suppress this with:
Assuming XY8338 is a computer on your network by giving it a static lease and adding in dnsmasq options
domain=ryyk.sise,<ip-adddress-of-XY8338>

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1959

PostPosted: Sun Mar 24, 2024 22:31    Post subject: Reply with quote
Disable "Forced DNS Redirection", you are breaking your own DNS resolution. Please read the SmartDNS documentation, as suggested already. All you should need is a properly configured VPN client on the laptop (and proper DD-WRT configuration).

Sticky: SMARTDNS Guide

DDWRT SmartDNS 7.pdf

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
milosh
DD-WRT Novice


Joined: 17 Mar 2024
Posts: 9

PostPosted: Mon Mar 25, 2024 7:54    Post subject: Reply with quote
Thank you!

I will restart from fresh factory settings, building customization up step-by-step, following SmartDNS sticky guides and dnsmasq guides. All the suggestions were helpful and I hope that I can get it working.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum