Hi Guys,
I have some domain mydomain.com
, created a bash script which updates
via api dns entry for home.mydomain.com if my actual IPV4 doesn't match dns.
I also did in /etc/config/dhcp
in dnsmasq
option local '/home.mydomain.com/'
option domain 'home.mydomain.com'
After I exec
sudo openvpn client.ovpn
[sudo] password for myusername:
Sat Oct 2 21:12:26 2021 OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Apr 27 2021
Sat Oct 2 21:12:26 2021 library versions: OpenSSL 1.1.1 11 Sep 2018, LZO 2.08
Sat Oct 2 21:12:26 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]120.225.54.5:443
Sat Oct 2 21:12:26 2021 Attempting to establish TCP connection with [AF_INET]120.225.54.5:443 [nonblock]
Sat Oct 2 21:12:27 2021 TCP connection established with [AF_INET]120.225.54.5:443
Sat Oct 2 21:12:27 2021 TCP_CLIENT link local: (not bound)
Sat Oct 2 21:12:27 2021 TCP_CLIENT link remote: [AF_INET]120.225.54.5:443
Sat Oct 2 21:12:27 2021 [server] Peer Connection Initiated with [AF_INET]120.225.54.5:443
Sat Oct 2 21:12:29 2021 TUN/TAP device tun0 opened
Sat Oct 2 21:12:29 2021 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Sat Oct 2 21:12:29 2021 /sbin/ip link set dev tun0 up mtu 1500
Sat Oct 2 21:12:29 2021 /sbin/ip addr add dev tun0 192.168.8.2/24 broadcast 192.168.8.255
Sat Oct 2 21:12:29 2021 Initialization Sequence Completed
got connected to home VPN, but DNS are not resolved
myusername@mycomputername:~$ nslookup another-computer.home.mydomain.com
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find another-computer.home.mydomain.com: NXDOMAIN
myusername@mycomputername:~$ nslookup another-computer.home.mydomain.com 192.168.8.1
Server: 192.168.8.1
Address: 192.168.8.1#53
Name: another-computer.home.mydomain.com
Address: 192.168.1.9
myusername@mycomputername:~$
I have that in my /etc/openvpn/server.conf
server 192.168.8.0 255.255.255.0
topology subnet
client-to-client
keepalive 10 60
persist-tun
persist-key
push "dhcp-option DNS 192.168.8.1"
push "dhcp-option DOMAIN home.mydomain.com"
Why it is not using 192.168.8.1 as DNS?
I did that
uci set dhcp.@dnsmasq[0].localservice="0"
uci commit dhcp
/etc/init.d/dnsmasq restart
Still not working.
Tried to modify
push "dhcp-option DNS 192.168.8.1"
to
push "dhcp-option DNS 192.168.1.1"
not working