The pfSense Store

Author Topic: Wildcard DNS entries  (Read 7067 times)

0 Members and 1 Guest are viewing this topic.

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 977
  • Karma: +3/-0
    • View Profile
    • TomSchaefer.org
Wildcard DNS entries
« on: December 09, 2011, 09:47:56 am »
If you need a wildcard in your DNS forwarder (*.domain.com)


   1. Log in to pfSense 2.0 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.

      address=/dev/127.0.0.1

Where dev is the end of the wildcard entry, and 127.0.0.1 is the ip that these wildcard names will resolve to. Think of dev as *.dev, but only list the part after the dot. So myhost.dev, myhost.subdomain.dev, and anything else that ends in .dev and is not defined elsewhere, will resolve to the ip provided.

So if you need *.com then the corresponding line will look like

      address=/com/127.0.0.1


Credit: http://serverfault.com/questions/321563/how-can-i-setup-a-wilcard-dns-entry-on-pfsense
Thank you Scott
« Last Edit: February 13, 2015, 01:19:08 pm by dvserg »
-Tom Schaefer
SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 2805
  • Karma: +147/-50
    • View Profile
Re: Wildcard DNS entries
« Reply #1 on: February 13, 2015, 01:39:49 pm »
Howto for DNS Resolver (Unbound):

1. Go to Services -> DNS Resolver
2. Add the desired wildcard entries to the Advanced box:

Code: [Select]
server:
local-zone: "example.com" redirect
local-data: "example.com 3600 IN A 192.0.2.1"

Documentation: unbound.conf(5)

Code: [Select]
redirect
                 The query is answered from the local data for the zone  name.
                 There  may  be  no  local  data  beneath the zone name.  This
                 answers queries for the zone, and all subdomains of the  zone
                 with the local data for the zone.  It can be used to redirect
                 a domain to return a different  address  record  to  the  end
                 user,    with   local-zone:   "example.com."   redirect   and
                 local-data: "example.com. A 127.0.0.1" queries for  www.exam-
                 ple.com and www.foo.example.com are redirected, so that users
                 with web browsers  cannot  access  sites  with  suffix  exam-
                 ple.com.