Yota
Very Senior Member
I'm writing a custom script about running a second instance of dnsmasq, and I want the second instance to use the default DNS server provided by the OVPN client, but because OVPN provider assigns a new DNS IP address every time it starts up,
So I'm wondering where I can check that IP address?
The only thing I've noticed so far is the push messages that exist in the syslog every time OVPN starts up.
I've tried checking the output of
Even after OVPN starts, there is no such file
Any ideas other than crawling the syslog?
So I'm wondering where I can check that IP address?
The only thing I've noticed so far is the push messages that exist in the syslog every time OVPN starts up.
Code:
ovpn-client2[10778]: PUSH: Received control message: 'PUSH_REPLY,sndbuf 393216,rcvbuf 393216,redirect-gateway def1,dhcp-option DNS 10.8.0.1,block-outside-dns,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 60,socket-flags TCP_NODELAY,ifconfig 10.8.0.31 255.255.0.0,peer-id 25,cipher AES-256-GCM'
I've tried checking the output of
nvram
and ifconfig
, and I don't find the DNS server pushed from OVPN.
Code:
tun12 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.31 P-t-P:10.8.0.31 Mask:255.255.0.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Even after OVPN starts, there is no such file
/etc/openvpn/client2/client.resolv
in my system. This may be related to my setting Accept DNS Configuration
to Disabled
. I must to disable this option because I didn't want everyone to use that DNS, only special clients and programs to use the DNS from OVPN via the second dnsmasq instance.Any ideas other than crawling the syslog?
Last edited: