I have a DHCP server (Linux, IPCop, dnsmasq) running on my default gateway server 192.168.0.1. I have a VPN endpoint on another server in the network (192.168.0.4). Is it possible to configure the DHCP server so it sends not only the default gateway but also routing information for the VPN (192.168.1.*) to DHCP clients when they request an IP address? The DHCP clients run Windows and Linux.
I tried to find something in the official documentation (http://www.ipcop.org/2.0.0/en/admin/html/custom-dnsmasq-local.html) but failed. The existence of RFC3442 indicates that it might be possible somehow.
Best Answer
This can be done by adding the following lines to
dhcpd.conf
:This distributes a route entry for network 192.168.1.0/24 using the gateway 192.168.0.4.
The meaning of the bytes is (in brackets the value from the example above):
Note: The number of
D1..DN
bytes varies depending on the network mask. See RFC3442 for details.