[solved] stamba restart loses dns server pushed by openvpncl

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 1447
Location: Appalachian mountains, USA

PostPosted: Sat Feb 15, 2020 18:31    Post subject: [solved] stamba restart loses dns server pushed by openvpncl Reply with quote
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.
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) 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