Wildcard DNS entries - host override



  • (An obvious corresponding post to the sticky one on address=, but for server=)

    If you need a wildcard in your DNS forwarder (*.domain.com)

    1. Log in to pfSense instance via the web interface.
      2. Go to Services-> DNS Forwarder (http://pfSensense_url/services_dnsmasq.php)
      3. Click the Advanced button. Add as many of the following as you need, each entry on a new line.

    server=/netflix.com/208.122.23.23

    Where netflix.com is the end of the wildcard entry, and 208.122.23.23 is the ip of the DNS server that these wildcard names will be resolved by. Think of /netflix.com as *netflix.com. So www.netflix.com, api-public.netflix.com, and anything else that ends in netflix.com and is not defined elsewhere, will be resolved by the DNS server at the ip provided.

    For a more thorough example see: http://www.gundersen.net/american-netflix-on-ipad-and-chromecast-without-vpn-using-pfsense/



  • It turns out that the domain override in the DNS Forwarder actually adds wildcards, it is just that the docs and the label/legend in the GUI does not explicitly say so.

    If you need a wildcard in your DNS forwarder (*.domain.com)

    1. Log in to pfSense instance via the web interface.
      2. Go to Services-> DNS Forwarder (http://pfSensense_url/services_dnsmasq.php)
      3. In domain overrides: add as many as you need, each entry on a new line.

    netflix.com 208.122.23.23

    Where netflix.com is the end of the wildcard entry, and 208.122.23.23 is the ip of the DNS server that these wildcard names will be resolved by. Think of netflix.com as *netflix.com. So www.netflix.com, api-public.netflix.com, and anything else that ends in netflix.com and is not defined elsewhere, will be resolved by the DNS server at the ip provided. Each entry is translated into a –server=/domain.com entry for dnsmasq. See dnsmasq man pages for further details.