TechnoSwiss
New Around Here
I've been searching and trying to get this working and I'm coming up blank, most of the posts I'm finding are about pushing DNS to the OpenVPN clients (that's working great) or adding hosts to the configuration file (that's also working great). What I want to do however is when my OpenVPN client connects to the router, I want the DNS updated with that clients OpenVPN address, so that other hosts on the network can resolve the client to an IP address. I've got a script running on client connect, I've tried 'dnsmasq --host-record=$common_name,$ifconfig_pool_remote_ip' but all that manages to do is create another instance of dnsmasq, not actually add the host-record into the running instance. I also tried using the addhosts option in dnsmasq config since it looks like it's supposed to read in new hosts files as they're added to the directory, but I just get an error that the option isn't supported. Is there a way to setup OpenVPN to add it's clients to dnsmasq just like the dhcp-clients on the local network (or setup the dhcp server in OpenVPN to do it?) or, is there a way to add new hosts to the running instance of dnsmasq from the script? Thanks.