|
version 1.1.1.1, 2013/07/29 19:37:40
|
version 1.1.1.2, 2021/03/17 00:56:46
|
|
Line 78 by modifying MODIFY_RESOLV_CONF_DYNAMICALLY="no" in <T
|
Line 78 by modifying MODIFY_RESOLV_CONF_DYNAMICALLY="no" in <T
|
| |
|
| |
|
| <h3>Automatic DNS server configuration with DHCP.</h3> |
<h3>Automatic DNS server configuration with DHCP.</h3> |
| You need to get your DHCP client to write the addresse(s) of the DNS | You need to get your DHCP client to write the address(es) of the DNS |
| servers to a file other than <TT>/etc/resolv.conf</TT>. For dhcpcd, the |
servers to a file other than <TT>/etc/resolv.conf</TT>. For dhcpcd, the |
| <TT>dhcpcd.exe</TT> script gets run with the addresses of the nameserver(s) in |
<TT>dhcpcd.exe</TT> script gets run with the addresses of the nameserver(s) in |
| the shell variable <TT>$DNS</TT>. The following bit of shell script |
the shell variable <TT>$DNS</TT>. The following bit of shell script |
|
Line 86 uses that to write a file suitable for dnsmasq.
|
Line 86 uses that to write a file suitable for dnsmasq.
|
| <PRE> |
<PRE> |
| |
|
| echo -n >|/etc/dhcpc/resolv.conf |
echo -n >|/etc/dhcpc/resolv.conf |
| dnsservs=${DNS//,/ } | dnsservers=${DNS//,/ } |
| for serv in $dnsservs; do | for serv in $dnsservers; do |
| echo "nameserver $serv" >>/etc/dhcpc/resolv.conf |
echo "nameserver $serv" >>/etc/dhcpc/resolv.conf |
| done |
done |
| |
|
|
Line 125 address of its ethernet card. For the former to work,
|
Line 125 address of its ethernet card. For the former to work,
|
| requests a DHCP lease. For dhcpcd, the -h option specifies this. The |
requests a DHCP lease. For dhcpcd, the -h option specifies this. The |
| names may be anything as far as DHCP is concerned, but dnsmasq adds |
names may be anything as far as DHCP is concerned, but dnsmasq adds |
| some limitations. By default the names must no have a domain part, ie |
some limitations. By default the names must no have a domain part, ie |
| they must just be a alphanumeric name, without any dots. This is a | they must just be alphanumeric names, without any dots. This is a |
| security feature to stop a machine on your network telling DHCP that |
security feature to stop a machine on your network telling DHCP that |
| its name is "www.microsoft.com" and thereby grabbing traffic which |
its name is "www.microsoft.com" and thereby grabbing traffic which |
| shouldn't go to it. A domain part is only allowed by dnsmasq in DHCP machine names |
shouldn't go to it. A domain part is only allowed by dnsmasq in DHCP machine names |
|
Line 186 more than one nameserver just include as many
|
Line 186 more than one nameserver just include as many
|
| |
|
| <H2>Local domains.</H2> |
<H2>Local domains.</H2> |
| Sometimes people have local domains which they do not want forwarded |
Sometimes people have local domains which they do not want forwarded |
| to upstream servers. This is accomodated by using server options | to upstream servers. This is accommodated by using server options |
| without the server IP address. To make things clearer <TT>local</TT> |
without the server IP address. To make things clearer <TT>local</TT> |
| is a synonym for <TT>server</TT>. For example the option |
is a synonym for <TT>server</TT>. For example the option |
| <TT>local=/localnet/</TT> ensures that any domain name query which ends in |
<TT>local=/localnet/</TT> ensures that any domain name query which ends in |