The pfSense Store

Author Topic: Help needed with DNS setup please  (Read 151 times)

0 Members and 1 Guest are viewing this topic.

Offline oscar.atkins

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Help needed with DNS setup please
« on: November 08, 2017, 10:45:45 pm »
Hi all,

I am setting up a DNS server on PFSense to resolve DNS queries on this DNS server.

I also have a web server in the network.

What I want to do is if someone sends a DNS query with the domain domaintest.com from their web browser then PFSense presents the client with the web server's IP address instead of resolving the query or forwarding it to the internet.

How would I do this? I tried DNS Resolver > Domain Overrides but the entries are to forward the queries to another DNS server instead of pointing the request to this IP address.

Thanks
« Last Edit: November 08, 2017, 10:49:13 pm by oscar.atkins »

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14276
  • Karma: +1329/-191
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Help needed with DNS setup please
« Reply #1 on: November 09, 2017, 04:45:22 am »
"resolve DNS queries on this DNS server."

What dns server - for what domain?  Do you mean you want to forward all queries to it, or just specific domain?
- 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 2.4.1-RELEASE on VM esxi 6.5 (home)

Offline oscar.atkins

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Help needed with DNS setup please
« Reply #2 on: November 09, 2017, 03:59:04 pm »
Hi Johnpoz,

thanks for your reply.

What I want to do is IF the client sends a query for a specific domain server1.domaintest.com server2.domaintest.com and so on with the domain name domaintest.com THEN forward this request to this static IP address which is my web server, ELSE either resolve everything on this server or forward them to the internet.

I went into  DNS Resolver > Host Overrides > Add > specify host name (server1) > Domain (domaintest.com) > IP Address xxx.xxx.xxx.xxx

This kind of works but for every single server I have in my network that I want my PFSense to be able to pass client request onto, I will need to manually type them all in.

If there a better way of doing this?


Offline KOM

  • Hero Member
  • *****
  • Posts: 5361
  • Karma: +667/-19
    • View Profile
Re: Help needed with DNS setup please
« Reply #3 on: November 09, 2017, 07:50:26 pm »
Quote
If there a better way of doing this?

Not that I can think of.  If you want to resolve your local clients to some bogus domain then you will have to add an entry for every client.  How many boxes are you talking about here?  What is it that you're really doing or trying to test?  You mentioned a web server.  Are you trying to test multi-domain hosting or something, or reverse proxying?