On Thu, Aug 2, 2012 at 12:49 PM, John Hallam <[email protected]> wrote: > I have a situation where my laptop sometimes connects to my IPv4 home > network over VPN and sometimes directly. I want to use DHCP to > allocate the address of the VPN endpoint on the laptop, to be the same > as when it is connected directly to my wired network. This basically > works fine. > > However, the DHCP client wants to set up a default route, but does it > wrong. OpenVPN knows how to do this right, and has already set the > default routing configuration correctly to point to the VPN tunnel, > except for those cases that should not route that way, so I want the > DHCP client not to set the default route. > > Is it possible to instruct dnsmasq to refuse to send dhcp option 3 > (router) and would this inhibit the DHCP client from setting a default > route? > > (There are various reasons why I can't change the DHCP client and why > this behaviour needs to be server-driven.) > > Any suggestions received gratefully... > > Thanks, > > John Hallam
John: I have had limited success in scenarios like the one you describe. Every time I configure dnsmasq to not send a dhcp option I end up breaking something else I was not planning on. Some other device needed the option and is now broken because the option does not exist. Some dhcp clients have a strange way of inventing values they need if they think they need them and the answers are not provided, in some cases even the IP address itself. I have always been eventually forced to alter the dhcp client in some way. FWIW, I have used OpenVPN and Dnsmasq together and been very happy with the setup but I don't have a working setup available to me at the moment so I can't look up any configuration details. _______________________________________________ Dnsmasq-discuss mailing list [email protected] http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
