Friday , June 22 2018
Home / Network Admin / Configuring BIND DNS Server on pfSense Firewall
pfsense

Configuring BIND DNS Server on pfSense Firewall

Print Friendly

In this tutorial, I’ll be configuring BIND DNS Server on pfSense Firewall for Domains Names Lookup for internal as well as external network.

1- First of all, install BIND package from pfSense provided packages at:

System” Menu   >   “Packages”   >   “Available Packages”  > Search for “BIND

install1

 

Click on icon_plus button in front of BIND package.

It will start installation of package as shown in following screenshot.

install2

 

2-    When installation is completed with Success Message, Goto   Services > BIND Server

 

bind-1
3-     Select the option “Enable BIND” to enable BIND Name Server

 

bind-2
4-     Goto “Views” Tab
5-    Create a new View by clicking on icon_plus button, Enter its name, Set “Recursion” to YES

 

bind3.1
6-    Select “Zones” Tab, add new zone by clicking icon_plus button, Enter Zone Name, Description (if want to).
7-    Enter “Name Server“:   127.0.0.1
8-    Enter “Base Domain IP“:    138.128.161.227  (ip of the host containing content/domain)
9-     “Serial” will be auto-generated after we save it.
10- Add Subdomains with their Records like A Record, MX record etc as below:
www                138.128.161.227
blog                 138.128.161.227
Click icon_plus button if require more sub-domains to be added.
11-    Click “Save” button.

12-   Restart BIND Service

 

bind3.2
13- ToDo:    Disable “DNS Forwarder” from “Services” Tab and start BIND Service.

14- If BIND Doesn’t start, in log, it gives error like:

……… <omitted>…..required ‘;’ before ‘}’……

Do the following:

– Goto pfSense Console.
– Press “8” to access “Shell Prompt”
– Edit following file:
# vi /cf/named/etc/named/named.conf
in the “Forwarder” IP portion, ip will be given as:
{8.8.8.8};                //suppose I’ve given 8.8.8.8 as DNS forwarder in Web GUI
change it to:
{8.8.8.8;};                //Semi-colon is required before ‘}’
– Save & exit
– Now restart BIND, it should be Successful now.

 

About Muhammad Attique

Related Posts

my file

Installing & Configuring OpenVPN Client on Kali Linux

In this blog post, I am going to install and configure OpenVPN client on Kali …

  • willian firmino

    How about the ACLs for the Views?

  • Muhammad Attique

    That depends upon your network, if you want to configure ACL, as it is best for a DNS Server, you may configure in ACLs Tab.

  • Christian W.

    Thx for this guide. But I have one more question: Where do I connect the entered subdomains with the internal ip’s? My Background: I have one public static ip, let’s say 15.16.17.18 an assigned DNS, let’s say example.com.
    Now I want to run two different subdomain: sub1.example.com und sub2.example.com which refer to two different servers in my LAN:
    teamspeakserver sub1: 192.168.178.100
    owncloudserver, sub2: 192.168.178.101
    How do I have to adjust the settings to make this work?

    Greetings
    Christian

  • Christian W.

    Thx for this guide. But I have one more question: Where do I connect the
    entered subdomains with the internal ip’s? My Background: I have one public
    static ip, let’s say 15.16.17.18 an assigned DNS, let’s say example.com.

    Now I want to run two different subdomain: sub1.example.com und
    sub2.example.com which refer to two different servers in my LAN:

    teamspeakserver sub1: 192.168.178.100

    owncloudserver, sub2: 192.168.178.101

    How do I have to adjust the settings to make this work?

    Greetings

    Christian