How to change dns server for local users or groups



  • Hi!

    I have an idea about dns servers used by the clients,

    As in my country some sites are forbidden by law and they are blocked by ISP's DNS services

    as far as I know we can prevent clients to use servers sent by DHCP/PPP on WAN and force them to use pfsense dns servers which we set in General Settings  section,

    İf we could have an option to chose dns servers acording to local users/groups we could for example chose google dns servers for a user group which we want them to have unlimited acces to internet regardless of ISP restrictons, and choose opendns or ISP dns servers (which applies restrictions) for another user group to have limited acces to internet.

    Is it possible, what do you think



  • When you say "user" I assume you mean "client computer", because when pfSense gives out network settings, that will be to a client computer with some MAC address. It will not know what the real "human" user name is.
    You can allocate static mapped IPs in DHCP Server and specify the DNS server for each client system.
    In 2.1 you can also setup multiple DHCP pools, with each pool giving out different DNS servers. But I don't see how to use this any more easily than static mapping each client, because you would have to squeeze in a long list of MAC addresses in the MAC address control box.



  • @phil.davis:

    When you say "user" I assume you mean "client computer", because when pfSense gives out network settings, that will be to a client computer with some MAC address. It will not know what the real "human" user name is.
    You can allocate static mapped IPs in DHCP Server and specify the DNS server for each client system.
    In 2.1 you can also setup multiple DHCP pools, with each pool giving out different DNS servers. But I don't see how to use this any more easily than static mapping each client, because you would have to squeeze in a long list of MAC addresses in the MAC address control box.

    thank you for your reply Actually I was referring to real "human" usernames, and you say it is impossible



  • If you have an Active Directory environment, there's probably some way to assign DNS servers via a user-based Group Policy.


Log in to reply