[Dnsmasq-discuss] Telling dnsmasq *not* to send router option??
Simon Kelley
simon at thekelleys.org.uk
Thu Aug 2 19:43:17 BST 2012
On 02/08/12 18:49, John Hallam 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...
>
Notwithstanding Rance's warnings that it may not do what you want, you
can configure dnsmasq to not send any option 3 with
dhcp-option=3
Setting an empty option in fact disables sending the option at all for
the options which have a default value (DNS server, default route...)
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list