[Dnsmasq-discuss] how to configure lot of static routes

wkitty42 at gmail.com wkitty42 at gmail.com
Thu Jun 25 15:02:56 BST 2015


On 06/25/2015 06:58 AM, Michał Lipka wrote:
> Hello,
> I've set dnsmasq to provide static routes for vpn clients.
> Several routes I can configure like this (gw is 1.2.3.4):
> dhcp-option=121,10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4
> dhcp-option=249,10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4
> (the second line is for compatibility with MS and Apple systems)
>
> Unfortunately I have a lot of different IP's to route (about 30).
> If I put all in one line dnsmasq won't start (it accepts about 255 bytes for
> dhcp-option according to RFC):
> Jun 24 19:43:32 vpn dnsmasq[21760]: dhcp-option too long at line 318 of
> /etc/dnsmasq.conf
>
> Jun 24 19:43:32 vpn dnsmasq[21760]: FAILED to start up
>
> If I make few lines with the same option only last is used:

does breaking the line work?

eg:
dhcp-option=249,10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4, \
   192.168.13.16/32,1.2.3.4,192.168.13.17/32,1.2.3.4, \
   192.168.13.18/32,1.2.3.4,192.168.13.19/32,1.2.3.4, \
   192.168.13.20/32,1.2.3.4

-- 
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.



More information about the Dnsmasq-discuss mailing list