pfSense Gold Subscription

Author Topic: How to stop free DNS  (Read 147 times)

0 Members and 1 Guest are viewing this topic.

Offline surajitom

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
How to stop free DNS
« on: December 05, 2017, 05:48:31 am »
We are using pfSense 2.3.3. We have configured NAT and forwarding all the traffic towards the Open DNS. Rule is working fine. I have made aliases, where I am trying to store  all the free DNS. When my user is using free DNs and if itís matched to my aliases, the content is being blocked. Every single day someone able to find out a new free DNS from the web and they are able to bypass the firewall rules and becoming nightmare for me. I have stored some around 350 free DNS, and I am able to find out that itís a tedious and meaningless job. Now itís my humble request to all of you is that thus it possible that whatever the DNS my user is using ,if itís  match to my pfSense DNS server, then only user could able to access the internet ,otherwise not.
Thanks in advance.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14416
  • Karma: +1335/-200
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How to stop free DNS
« Reply #1 on: December 05, 2017, 06:34:02 am »
Whack a mole is not best way to do anything.  If you do not want people to use other than your own, etc.. Just block all dns and only allow the dns you want to use - this would be a much shorter list ;)

Its hard to understand your rule list without seeing the full picture.. Just allow dns to your pfsense, anything else dest to 53 just redirect..  No need to create the open alias at all.
« Last Edit: December 05, 2017, 06:38:26 am by johnpoz »
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.3.4_p1 (work)
1x SG-4860 2.4.2-RELEASE (home)

Offline GruensFroeschli

  • Little Green Frog
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5423
  • Karma: +86/-3
  • No i will not fix your computer!
    • View Profile
Re: How to stop free DNS
« Reply #2 on: December 05, 2017, 07:00:30 am »
If i dont want users to use their own DNS server, i do this:
https://doc.pfsense.org/index.php/Redirecting_all_DNS_Requests_to_pfSense
We do what we must, because we can.

Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

Offline NogBadTheBad

  • Sr. Member
  • ****
  • Posts: 385
  • Karma: +31/-0
    • View Profile
Re: How to stop free DNS
« Reply #3 on: December 05, 2017, 07:56:02 am »
Whack a mole is not best way to do anything.  If you do not want people to use other than your own, etc.. Just block all dns and only allow the dns you want to use - this would be a much shorter list ;)

Harder to do in some cases, my Netflix client on my "Smart" TV always uses 8.8.8.8 for DNS regardless of what is set on the TV ;)

If I was that worried I'l use the method GruensFroeschli posted.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14416
  • Karma: +1335/-200
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How to stop free DNS
« Reply #4 on: December 05, 2017, 12:24:00 pm »
True if something has dns hard coded and you don't want it to use that dns, then yes you have to hijack/redirect it per the link GruensFroeschli provided.. Which is not whack a mole like the OP is attempting..

From the rules I can see I don't even see his reason for the whack a mole alias.. From the rules I can see if user picked something that was not in the alias it would be blocked.. So why not just use 1 rule redirect all to 53 and be done with it..

"Every single day someone able to find out a new free DNS from the web and they are able to bypass the firewall rules"

He says users are able to bypass?  So he must have a any any rule in there somewhere above his access to lan for dns and his block?  Really need to see his full rules list to figure out how his users are able to bypass.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.3.4_p1 (work)
1x SG-4860 2.4.2-RELEASE (home)

Offline Grimson

  • Full Member
  • ***
  • Posts: 176
  • Karma: +26/-2
    • View Profile
Re: How to stop free DNS
« Reply #5 on: December 05, 2017, 03:31:25 pm »
Have a look at his earlier thread concerning this: https://forum.pfsense.org/index.php?topic=140777.0