I have a config defined for a client that includes an iroute directive:
Now when I access this route over VPN (through the server) the learn address script is called (that I also have) for an internal host particular to that client:
Code: Select all
Tue Feb 21 07:39:40 2017 MULTI: Learn: 10.5.0.1 -> <common name>/<ip address>:1194
As a result, not only is a route added for that host (that's what my learn-address script also does) that already exists (for the 10.5.0.0 subnet, since learn-address is also called for THAT) but also since this learn-address is called with the same common-name, it now replaces my original common name as well in my DNS table (the client of the VPN server).
To put it more succintly, whenever I access this 10.5.0.1 host which is a subnet behind a client OpenVPN recognises it and calls learn-address on it which lands me in trouble :p.
How can I prevent OpenVPN from doing so? Do I have to code for this in my script?