Site Tools


advanced-dhcpdns

DHCP/DNS/TFTP

This menu let you configure advanced settings for the DHCP, DNS and TFTP services for both the LAN and WAN. Most of this functionality is provided by dnsmasq.

DHCP Client (WAN)

The DHCP Client (WAN) section includes a dhcpc (dhcp client) options field. Here you can set parameters for your router's DHCP client.




Enable DNSSEC support: DNSSEC secures DNS by authenticating its servers. This prevents DNS hacking and poisoning. If the authoritative DNS server has DNSSEC, enabling it ensures DNS queries are answered by that DNS server, and not an imposter.

DNSSEC isn't encrypted, so it's compatible with standard DNS. Enable this if your DNS server supports it for security.


Use dnscrypt-proxy: DNSCrypt encrypts DNS resolution. When a DNSCrypt-enabled server is chosen, a unique key pair is generated every hour. Queries are then encrypted using this key pair before being sent to the server, usually on TCP port 443. The reply is also encrypted. Checking Use dnscrypt-proxy enables the built-in dnscrypt proxy client. Dnscrypt-proxy and Stubby cannot be used at the same time.


When dnscrypt-proxy is checked, the following options/fields appear:


  • Ephemeral Keys - If checked, a new key pair is generated for each DNS query.
    Use this with care, as it's very cpu-intensive,
    and may slow DNS resolution.
  • Manual Entry - If enabled, 3 more fields are displayed:
    • Resolver Address - the IP address of the dnscrypt-enabled DNS server.
    • Provider Name - the name of the DNS provider, for instance FreshTomato.
    • Provider Public Key - the public key given by the DNSCRYPT-enabled
      DNS provider
      (to generate a key pair)
  • Resolver - This dropdown list currently contains about 200 DNS servers.
    • Some support DNSSEC.
    • Some don't log queries.
    • Some are filtered.
  • Priority - Should be left at no-resolv to prevent DNS leaks. This should never
    be selected
    when using DNSCRYPT. Also, to prevent leaks, enable Intercept DNS port.
  • Local Port - The port on which dnscrypt-proxy communicates with FreshTomato DNS.
    Leave at 40 unless you're an advanced user. Don't set it to 53, it could create a loop.



To help choose a DNSCrypt DNS provider, import the file /etc/dnscrypt-resolvers.csv in a spreadsheet. Once chosen,
the server's IP address, provider name, and public key can be taken from that file.


Use Stubby (DNS-over-TLS): This enhances DNS privacy. Checking this enables Stubby, a DNS Stub resolver.

DNS over TLS (“DoT”) sends DNS queries via a secure (TLS-encrypted) connection. TLS is the same technology
that encrypts secure Web traffic. This prevents third parties from seeing your DNS queries.


When Stubby is enabled, further options appear:


Upstream resolvers: Here, choose the upstream servers responsible for performing name resolution.


Priority:

  • Strict-Order - Tries Stubby first. If issues arise, falls back to
    resolution methods like standard DNS.
  • No-Resolv - If Stubby fails/has issues, there is no fallback to
    other DNS resolution methods.
  • None - Adds Stubby as a resolution method for dnsmasq.
    This alone does not guarantee.


Local Port: The port Stubby uses to serve clients. Dnsmasq will be the only client for Stubby, but serves the clients.


Log Level: Here, choose what level of detail is written in log entries.


Force TLS1.3: Enforces usage of TLS 1.3 for encryption. It must be supported upstream.


WINS (for DHCP): The IP of a WINS Server to give to DHCP clients.

This doesn't enable WINS. WINS is enabled in the File Sharing menu.

Windows Internet Name Service (WINS) is a legacy name resolution service to map NetBIOS names to IP addresses. It's outdated and mostly obsolete. DNS was supposed to replace WINS. However, WINS may still be necessary for some LAN browsing functions on old Windows versions.


DHCPC Options: In this field you can enter custom configuration settings for the dhcp client.


Reduce Packet Size: udhcpc (the DHCP client FreshTomato uses to obtain a WAN IP address) has a problem. It has a DHCP discovery packet size 590 bytes long. However, DHCP relay servers can handle only DHCP discovery packets up to 576 bytes. If there are DHCP relay servers between FreshTomato and your ISP's DHCP server, FreshTomato might fail to acquire a DHCP lease on the WAN interface.

The extra bytes were all padding, thus unnecessary. FreshTomato developers eliminated the padding, reducing udhcpc DHCP discovery packet size to 331 bytes. This size eventually became the default setting. Now, udhcpc can successfully obtain a DHCP lease from an ISP with DHCP relays.

However, some users may not be able to obtain a WAN IP address unless they disable this feature. (Default: Enabled).

DHCP / DNS Server (LAN)




Use internal DNS: Uses dnsmasq as the DNS server on your LAN. DHCP clients will receive the router's local IP address as the DNS server. (Default: Enabled).


Debug mode: Checking this makes FreshTomato write detailed information to the log file.


Use received DNS with user-entered DNS: Add DNS servers received from DHCP on your WAN connection to the manual DNS server list. Please See the Network menu for details. (Default: Disabled).


Intercept DNS port: Causes DNS requests/packets sent on port 53 to be redirected to the internal DNS server. Only IPv4 DNS requests are intercepted. (Default: Disabled).


Use user-entered gateway if WAN is disabled: Makes DHCP assign the router IP address as the default gateway on the LAN. (Default: Disabled)


Ignore DHCP requests from unknown devices: Makes dnsmasq ignore DHCP requests from MAC addresses not listed in DHCP Reservation. These clients won't obtain an IP address via DHCP. This setting is also available in the DHCP Reservation menu. (Default: Disabled).


Generate a name for DHCP clients which do not otherwise have one: If a hostname in the Device List isn't reported, a name for it is automatically generated for it, based on its MAC address.



Solve .onion using Tor: If Tor is enabled, this option causes it to resolve “.onion” domains. This allows proper DNS resolution on the Tor network.

For more information about the built-in Tor client, see the TOR page.


Maximum active DHCP leases: Sets the maximum allowed active DHCP leases at one time. (Default: 255).


Static lease time: Sets the absolute maximum valid time for any DHCP lease.

  • Same as Normal Lease Time - Static lease time is the same
    as normal (1440 minute) lease time. (Default.)
  • Infinite - Static lease time is infinity
  • Custom- Allows you to enter a custom Static DHCP lease time.


To retain leases after rebooting the router, please see this HOWTO for details on non-volatile DHCP leases.


Announce IPv6 on LAN (SLAAC): Turns on router advertisements for IPv6 (SLAAC) protocol. This protocol allows hosts to self-configure an IPv6 address using minimal contact with a server.


  1. The client sends out an RS (router solicitation) ICMP packet.
  2. The nearest router responds with an RA (router advertisement) packet.
  3. The client uses the IPv6 prefix from the RA packet as the first
    64 bits of its address. It then derives the last 64 bits
    of its address using the EUI-64 process or a randomization algorithm.


Announce IPv6 on LAN (DHCP): Makes FreshTomato enable router advertisements using IPv6 DHCP.


Fast RA mode: Forces dnsmasq to be always in frequent RA mode.


DHCP IPv6 lease time: This number sets the default lease time for IPv6 DHCP leases.


Mute dhcpv4 logging: This stops FreshTomato from logging IPv4 dhcp activity. (Default: Disabled).


Mute dhcpv6 logging: Stops FreshTomato from logging IPv6 dhcp activity. (Default: Disabled).


Mute RA logging: This prevents logging of Router Advertisement activity.




Prevent client auto DoH: Modern browsers include DNS Over HTTP(s). When DoH is enabled, a browser can bypass the system's DNS server. Enabling this option prevents DoH communication. This helps Adblock-DNS Filtering to work properly, since it relies on unencrypted DNS resolution.


Enable DNS Rebind protection: DNS rebind is a type of malicious attack on domain resolution. Using this may have secondary effects. (Default: Enabled).


Forward local domain queries to the upstream DNS: This forwards local domains to the router's upstream DNS server. Avoid using this unless you have a fully (publicly)-registered domain on your LAN.


Enable multicast DNS: Checking this enables an implementation of Avahi mDNS.

Avahi is system that lets programs publish and discover services and hosts running on a LAN. It is a zero-configuration implementation that includes multicast service discovery via the mDNS/DNS-SD protocol suite. “Bonjour” (in Apple MacOS X) and “Zeroconf” technologies are compatible with Avahi.


Enable reflector FIXME


Custom configuration: Here, you can to add custom options to the dnsmasq configuration file.

TFTP Server

Enable TFTP: Enabling this starts dnsmasq's TFTP server with the “–tftp-no-fail” options enabled by default. This prevents dnsmasq issues, for example, if TFTP root becomes unavailable.


TFTP root path: Text entered here defines where TFTP root is located in the filesystem.


PXE on LANx (brx): Enbables Pre Boot eXecution Environment on one or more bridges. PXE was designed for diskless clients. A PXE client can obtain an IP address via DHCP and then download boot code via a TFTP location. Syslinux is a good example of this.

DHCP/DNS/TFTP Notes

  • DNSSEC and DNSCrypt / Stubby complement each other.
    • DNSSEC provides authentication.
    • DNSCrypt provides encryption.
advanced-dhcpdns.txt · Last modified: 2024/10/05 17:13 by hogwild