SurprisedItWorks DD-WRT Guru
Joined: 04 Aug 2018 Posts: 1447 Location: Appalachian mountains, USA
|
Posted: Sat Feb 15, 2020 18:31 Post subject: [solved] stamba restart loses dns server pushed by openvpncl |
|
Many of us have found that when using recent builds, we've needed to include something like this in Startup in order to be able to use Samba: Code: | { sleep 60; stopservice samba3; startservice samba3; } & |
I have discovered that a side effect of this Startup line (I'm currently on BS build 41954) was to cause /tmp/resolv.dnsmasq to be regenerated, I assume by dnsmasq, from the ISP resolvers and the static DNS choices in Basic Setup. This has the unfortunate effect of losing the DNS server pushed by the OpenVPN client and installed in /tmp/resolv.dnsmasq by /tmp/openvpncl/route-up.sh. I've seen this behavior in two WRT1900ACSv2 routers.
This problem is solved by replacing the above Startup code snippet by this one: Code: | ( sleep 30
R=/tmp/resolv.dnsmasq
cp -a $R $R.vpn
stopservice samba3
startservice samba3
mv $R.vpn $R ) & |
_________________ 2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN. |
|