2015-09-27 4:53 GMT+08:00 Simon Kelley <si...@thekelleys.org.uk>:
> You can't put non-standard ports in a resolv-file, the format of those
> files does not include ports.
>
> It is possible to put a non-standard port in dnsmasq configuration files
> using
>
> server=server1#port1
>
> So simply make your file look like
>
> server=server1#port1
> server=server2#port2
> server=server3#port3
> server=server4#port4
>
> call it /path/to/servers.dnsmasq
>
> and tell dnsmasq to read it as a dnsmasq configuration file.
>
>
> sudo dnsmasq -d -p 5353 -C /path/to/servers.dnsmasq  --all-servers

According to the help of dnsmasq, it seems that the more appriate
method should be using the following option to invoke the above
configuration file:

    --servers-file=<path>               Specify path to file with
server= options

sudo dnsmasq -d -p 5353 --servers-file=/path/to/servers.dnsmasq  --all-servers

In addition, I want to know another thing: how to control the shortest
time with which I wait for the responding from these upstream dns
servers.  I mean: when using `--all-servers' option, the dnsmasq will
query all of these dns servers parallely and I want to use the most
firstly query returned to me and then throttle the remail query for
the spefific domain name.  Is this possiable?

>
>
>
> That should do the trick.
>
>
> Cheers,
>
> Simon.
>
>>
>
> On 24/09/15 02:56, Hongyi Zhao wrote:
>> Hi Simon,
>>
>> I have server upstream dns servers with non-standard ports opening for
>> querying, i.e., as follows:
>>
>> server1:port1
>> server2:port2
>> server3:port3
>> server4:port4
>>
>> I want to use the `--resolv-file=<path>' option to invoking the file
>> which stored the infomation for these servers.
>>
>> Say, I named this file as resolv-file.dnsmasq, and its content has the
>> following forms:
>>
>> server server1#port1
>> server server2#port2
>> server server3#port3
>> server server4#port4
>>
>> Then I use the following command to run the dnsmasq:
>>
>> sudo dnsmasq -d -p 5353 -r /path/to/resolv-file.dnsmasq  --all-servers
>>
>> But, at this step, I get the following errors:
>>
>> dnsmasq: no servers found in /path/to/resolv-file.dnsmasq, will retry
>>
>> So, how to let dnsmasq using multiple upstream dns servers with
>> non-standard ports?
>>
>> Regards
>>
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



-- 
Hongyi Zhao <hongyi.z...@gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to