Possible to serve different DNS Host Override on per client basis?

  • I am responsible for a website associated with a certain domain, let's say domain.com. Right now the old version of the website is hosted on a server with IP address IP_OLD. I have a new version of the website which is hosted on a different server with IP address IP_NEW.

    Right now, the internet DNS entry for domain.com points to IP_OLD.

    What I need to do:

    1. Test the new website, which is at IP_NEW. For this my thinking is to use a host override to make domain.com resolve to IP_NEW.

    2. Once the internet DNS entry is pointing to IP_NEW, still access the old website at IP_OLD. For this my thinking is to use a host override to make domain.com resolve to IP_OLD.

    First off, is the above reasonable?

    Second, is there a way I can configure the host override such that the overridden address is only served to certain clients on my LAN? The problem is I don't want ALL of my LAN machines to route to the overridden address, just a single machine.

    If host override will not work, is there some other way to achieve what I'm looking for?

  • @axxxxe


  • By adding the domain and IP in the hosts file ?
    Even Windows has such a file.

  • Yes, this looks like it should work! Thank you!!

  • @Gertjan

    But then that would have nothing to do with pfSense. I used to do that years ago, before I had my own DNS server. The OP's question was about host override, which makes it a pfSense question.

  • Your hosts answer is not pfSense-related, but is still the right answer :-)

  • Sure - I know, your answer is perfectly fine ^^
    I even omitted to mention that the host file should be located on the client's device.
    But I guess @axxxxe understood that.

  • I understand the hosts file is on the client machine, which is exactly what I want.

Log in to reply