Categories: Pfsense

Create your own Nameserver using TinyDns on Pfsense

&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2530 " id&equals;"quads-ad2530" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<p>If you ever thought of hosting your own Public DNS for your own domain then this article is going to be of help for you as I will go through the process of hosting my own Public DNS for my freely acquired domain www&period;moh10ly&period;cf<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2523 " id&equals;"quads-ad2523" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2531 " id&equals;"quads-ad2531" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2527 " id&equals;"quads-ad2527" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;&NewLine;&NewLine;&NewLine;<p>These free domain providers have poor Public DNS capabilities and usually lack of many DNS records e&period;g&period; &lpar;SRV&comma; TXT&comma; PTR&rpar; and that what made me personally want to go on and host my own public DNS for this domain&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>I&&num;8217&semi;m going to use Pfsense 2&period;1&period;5 for this demonstration but I guess 2&period;2 also works as well but haven&&num;8217&semi;t tried TinyDns on it yet&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Ok so to configure your own nameserver&comma; first you must have a public domain &lpar;domain&period;com&rpar; &period;&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p> In this example I will register a free domain from this registrar&colon; <a href&equals;"http&colon;&sol;&sol;www&period;google&period;com&sol;url&quest;q&equals;http&percnt;3A&percnt;2F&percnt;2Fwww&period;freenom&period;com&amp&semi;sa&equals;D&amp&semi;sntz&equals;1&amp&semi;usg&equals;AFQjCNGWKjWOoBcdirdc1YvjMHYJJPoQ7w" target&equals;"&lowbar;blank" rel&equals;"noreferrer noopener">www&period;freenom&period;com<&sol;a><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>The process for registration is pretty simple&comma; you will have to follow the wizard and validate your email then sign in to <&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>your portal to edit or configure your free domain&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>I have already added a new domain for myself which is called &lpar; moh10ly&period;cf &rpar;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh5&period;googleusercontent&period;com&sol;u772LKTatdWkaBl&lowbar;Xl-0-qJd95izfrNsZdI1rZobMcI4a2rWXsRzGjGei0rBnosKOyTJdAdxHXlEmPgsS50tFHoTo9kgKwprxvgCj85QDJ4fUNKtRXI&equals;w1175" alt&equals;""&sol;> &NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2529 " id&equals;"quads-ad2529" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; &NewLine;<&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p> To configure name servers&comma; You must fulfill the following prerequisites&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<ol class&equals;"wp-block-list"><li>Public static IP&period;<&sol;li><li>DNS Package on Pfsense<&sol;li><li>Firewall that supports static NAT&period;<&sol;li><&sol;ol>&NewLine;&NewLine;&NewLine;&NewLine;<p>Next step&colon; I will click on Manage domain to change the DNS configuration to point it to my own name server<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh6&period;googleusercontent&period;com&sol;Wy9tHs6pQ83AbPfgD17ugtelEw8Rls7O&lowbar;2y-cjFreze&lowbar;L-obUUDnrwMtHO8ehIDgzTQhSSsLCg6zcJOAXD3g&lowbar;W-tnz&lowbar;60znsgtKh5sLnXFHEDr5r9&lowbar;XB&equals;w874" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p> When you get the following window&comma; click on Management tools and choose &&num;8220&semi;Register glue records&&num;8221&semi;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh4&period;googleusercontent&period;com&sol;FUfCDn45mfIgjKCNP7UShImMUIrUwKjJJbfHTW95DQbVyTD06mHjemDOEqSjF04GlRCoRD06BURxijGlIe-RokEMFIo-w0Vn3ZrD7QsE7fAJAI9wKL0&equals;w673" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p> <strong>Very important note&colon;<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Next add your Name servers &lpar;They don&&num;8217&semi;t need to exist as we will create them later&rpar; but you will have to create 2 at least <&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>and you can point them to the same Public IP address&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh5&period;googleusercontent&period;com&sol;kILxDuqIaGM8BScOBMPQgGLplG2Ge1NrIuYsPgNCBZBudYnTv8YgcIo1anA35QNwseSes&lowbar;23WMZ&lowbar;-aIS1sBe2iOIMbDAEr8c0hjUa3Drf3-DD6ge5F68&equals;w974" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>Scroll down and you will find an option to add the second dns&comma; you can call it dns2 and point it to the same IP address&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Next save changes&comma; then click on Management tools &&num;8211&semi;&gt&semi; Name Servers and there if you couldn&&num;8217&semi;t find the new name servers <&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>you have configured then enter them here&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh4&period;googleusercontent&period;com&sol;oR2RQvEH9WancFxmNjyGo4kmjgU3qbgB05kr1mFP0Io2FzsbpJrio5ChEmB&lowbar;sdofa8H38EApa7eZNdknjWgbO53JtHiQ-IVi3j1OqTytZc&lowbar;ssIzdERet&equals;w874" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>Save changes again<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Now let&&num;8217&semi;s go on Pfsense and setup our Public DNS &lpar;Name Server&rpar;&comma; You will have to go to &&num;8220&semi;System&gt&semi;Packages&gt&semi;Available <&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2522 " id&equals;"quads-ad2522" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;&NewLine;&NewLine;&NewLine;<p>Packages&&num;8221&semi; and there download &&num;8220&semi;dns-server&&num;8221&semi; or &&num;8220&semi;TinyDns&&num;8221&semi;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh5&period;googleusercontent&period;com&sol;2Nda4ofOsIkRwVkrEidc7AP2AXwX5RLSlOWe5kupyncRFF0d6gjnnKHLEKSVJaIiuoJf12uBbLoW6886K5y5Mw5f2k5bMDWorsyfPLtX&lowbar;-Iwld9qeDNg&equals;w773" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>When you have finished installing TinyDns you will find it under <strong>&&num;8220&semi;Services&&num;8221&semi;<&sol;strong> menu&period; Click on it<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Once you are there&comma; click on &&num;8220&semi;Settings tab&&num;8221&semi; and on the binding IP address place your Public IP which you&&num;8217&semi;ll use for the name<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>servers&period; And make sure you use the WAN NIC to listen on&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh5&period;googleusercontent&period;com&sol;CwWLQQqcHo4StyO7yleg&lowbar;0d9KdS2ytr41l0DoaiKSFOYbLcSkeaDzK78EfIADMkSzq&lowbar;GA7QW4FEiDKPwf6gYOx-ihLNGQONGxUScmPEBG8GXwDr60IZx&equals;w874" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>Save and click on the &&num;8220&semi;<strong>New domain wizard<&sol;strong>&&num;8221&semi; to setup your domain<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh3&period;googleusercontent&period;com&sol;XkALUYmJN53v78NqAQfV1aGEstVm&lowbar;PD41VQ-9bofed2NNg4y4HDE7AVxRrE1Et6oBJJgH7KCMX6gqPV8Vk8lQP6GQ-3s54Rzt5RR4UdkhIlx0cKuAeA&equals;w572" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p> <strong>Click Next<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh4&period;googleusercontent&period;com&sol;lFvpmwEfJz1EYn70DOtKimAfDJ8zu8RS65ALA&lowbar;2s1BwUOmzqLYs21WQIos-xhovbBsZnZ76hSytXjrTulxIXNGIuF9cx0y-zF7cCLsev2rLnoiDd3nQ&equals;w673" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>On the next window configure your domain as in the following&comma; make sure that it matches your configuration on registrar&&num;8217&semi;s<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>domain&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh5&period;googleusercontent&period;com&sol;yZ8c5V6DuVK5owm6tqDue6qYuQw2TG57XPsdNz3O84fDhCl0Jtqa1xQFXkX&lowbar;CXoKKI6KcqMKrnxrb6Mifh70aUGhivS0c6hIo6dBQtMzuuHDUSO4mKg&equals;w572" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>Click Next and Finish<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Once finished&comma; go to the Add&sol; Edit record tab and there you will find 4 created records<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh5&period;googleusercontent&period;com&sol;PJG-1P2KKEiLvCaBjAabWR6O&lowbar;AkJaFUF&lowbar;4SSxYQESEs98XXlcwTDz4b4YR4W2ppn8oDkhhPGmxrmw4LkLOFjNj2cU6CqRYa12Ah1IeM2rhSHtX050yc&equals;w773" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>Next create the root DNS record which is &period; And point it to the same public IP and any other records that you might have an<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>installed role for like Exchange&comma; IIS &period;&period;etc<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh6&period;googleusercontent&period;com&sol;OqTm9d20YRCMf9IokhojODsHeeAEC23GH-KpKU83-jEqtyXWd3yXdc8X6aAbmrUxln0oB7NTA0DLnOzz&lowbar;IfJopwcVMQAR5X8YatIbdIbayJuqBuidIY&equals;w773" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>Now it&&num;8217&semi;s time to configure the firewall to allow inbound queries on port 53&period; here&&num;8217&semi;s the rule that I have created under <&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>&lpar;Firewall&bsol;Rules&rpar; because I have only one Public IP address on WAN I won&&num;8217&semi;t use a static NAT rule&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh5&period;googleusercontent&period;com&sol;7hntvlHKZX3NUd0SD6cZpFvIiTXM8moEsj97cq9f3jQXTExDnHxNKix3&lowbar;eboYNZSHJVMLKIMZnT-61d7IdtjDjx2L-LXfaYxmaMv-iw769WIDJTT3Q&equals;w773" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>I will go back to TinyDns on Pfsense to see the incoming requests for name resolving from public clients&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Under the logs tab I could see the requests I was making from my PC using google as my DNS&period;&period; So everything works fine&period;<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2528 " id&equals;"quads-ad2528" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;&NewLine;&NewLine;&NewLine;<p>That&&num;8217&semi;s it&comma; the configuration of your own Name server is done&period; <&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh3&period;googleusercontent&period;com&sol;OdVUHDIi1EdEaJIicj8norgy3qwp4NnteA2oYDjICcI3pIX1bNru33Wn&lowbar;&lowbar;PeNU&lowbar;nRLlRtWRJ4WnEX&lowbar;MpqUiufsV9IOMmXd90qnyGOvqpUVWKObdGetQ&equals;w773" alt&equals;""&sol;><&sol;figure>&NewLine;<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2526 " id&equals;"quads-ad2526" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;

moh10ly

Share
Published by
moh10ly

Recent Posts

Reset passwords for Active Directory Users

Reset and manage your Active Directory users' Passwords Active Directory is one of the most…

3 years ago

Finding Exchange Database hidden mailboxes. ​

Finding Exchange Database hidden mailboxes. Story:Maybe you have been in this situation before, trying to…

3 years ago

Setting up ADConnect and PTA (Password auth through) servers agents behind proxy

If you're using a Proxy server in your firewall or in your network and have…

3 years ago

Get Report of Active Directory Locked Accounts and Machine they logged in from

Story:I got some clients  that have reported some of their users being locked out and…

3 years ago

Checking and Providing Full and SendAs delegate access on O365 Exchange Online

Delegate Permissions This is a code that I have wrote recently to check if an…

3 years ago

Retrieving attachments from Exchange mailbox using python

Story: I got a request from a client who constantly gets CVs and have to…

4 years ago

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298