[Dnsmasq-discuss] using regular expressions in server list

Jan Seiffert kaffeemonster at googlemail.com
Sun Apr 28 11:25:03 BST 2013


Brent S. Elmer Ph.D. schrieb:
> I have lines in dnsmasq.conf for domains on my vpn like the following:
> 
> server=myvpn.company.com/4.1.1.1
> 
> The problem is that it looks like after the initial connection, it
> diverts to using an address like myvpn02.company.com.
> 
> Is there a way to use a regular expression to do something like the
> following:
> 
> server=myvpn[0-9]*.company.com 
> 

Maybe my regex-path is of help:
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2012q1/005615.html

so you could write:
server=/:myvpn[0-9]*\.company\.com:/4.1.1.1

But there are two problems:
1) It's for 2.60, it would need an update to the latest dnsmasq
2) i don't know if it really works on the server derictive, it was written
for the address deritive, that it also "handles" server is a byproduct of
using the same code in the config parsing...

Greetings
	Jan

-- 
Carpe the heck out of the diem



More information about the Dnsmasq-discuss mailing list