Redirect DNS to for Specific source IPs

  • I have followed the following guide but can't seem to make it work.

    I've done the following

    Interface: LAN
    Protocol: TCP/UDP
    Source IP: Alias (bypassDNSBL)
    Source Port: 53 (DNS)
    Destination: // this is my pfsense server address
    Destination Port Range: 53 (DNS)
    Redirect Target IP:
    Redirect Target Port: 53 (DNS)
    Description: Bypass for DNSBL
    NAT Reflection: Disable
    Filter rule association: Add associated filter.

    Then in firewall lan rules i moved this rule above the rule which blocks external dns.

    I can't figure out what i am doing wrong.

    What i want to do is the IPs specified in bypassDNSBL would be redirected to google dns server so they can bypass DNSBL and get unfiltered access.

    Help me please

  • I don't think this thread belongs in the NAT section, since that really doesn't apply here. Anyway...

    How many machines (computers or phones) are we talking about? You said you made an alias, but didn't give a number count.

    This is what I do - Set static DHCP addresses for these devices, and in the Services -> DHCP Server -> LAN -> Edit Static Mapping section, physically give them the Google DNS server addresses -,, it's about 8 or 9 lines down the screen, says DNS Servers with a bunch of text boxes.

    If you don't have too many hosts on the LAN, it's really easy. On these hosts, you should refresh their DHCP leases, then they'll pick up the new settings from PFSense.

    Also, delete that firewall rule you created, it's not necessary. That one after this rule, the block external DNS one, might cause trouble, however... Somebody here, better with DNS, should comment on that.


  • I've already tried the method you mentioned. But i think there is a bug in pfSense.
    What i want to set is
    Primary dns
    Secondary dns

    Note pfsense ip address is

    When i set
    primary dns
    Secondary dns

    Dhcp settings are right this way. And dhcp clients get the correct order from dhcp server

    But when i set what i require
    Primary dns
    Secondary dns

    Clients get
    Primary dns
    Secondary dns

Log in to reply