Android DHCP, DNS issue.



  • This is an old issue, but where I used to have a solution (using static IP's) that is no longer an option.

    Here is the problem, have a bunch of Android devices, they work great except for one problem. The DNS when I used DHCP is always Googles DNS first, then maybe internal DNS.

    This wont work, as both Google and Internal DNS servers have common URL's (mail....., phone..... etc) and internally I need the android devices to resolve on the internal DSN server first, then an external DNS (optional;). Is there a way I can forward all externally bound DNS requests to my internal DNS server, for both IP4 and IP6?

    Greg


  • LAYER 8

    https://docs.netgate.com/pfsense/en/latest/dns/redirecting-all-dns-requests-to-pfsense.html
    follow this instruction and just change the redirect ip to what you want, it should work even if i'm not a fan of this kind of configuration, you should just use the internal dns in your dhcp and block all other dns.



  • @kiokoman
    I put in the rule (edited for space):

    Source Invert match. 10.10.10.128/27
    DestinationInvert match.
    Type
    /
    Address/mask
    Destination port range
    From port DSN To port  DNS
    Redirect target IP
    10.10.10.221
    Redirect target port
    Port  DNS
    Description
    Redirect DHCP DNS
    
    LAN	TCP/UDP	! 10.10.10.128/27	53 (DNS)	LAN address	53 (DNS)	10.10.10.221	53 (DNS)	Redirect DHCP DNS
    

    What I am going for is IP addr 10.10.10.128 to 10.10.10.159 DNS requests are sent to 10.10.10.221. All other DNS requests are sent to where ever they should be sent address specified in the client. (ie servers etc)

    This more or less correct?

    You also said this is not something you would do. Curious how would you get around this issue with Androids?

    Greg


  • LAYER 8

    i have bind9 dns server configured with internal/external view on my locations, i just permit only my internal dns server and block everything else,


Log in to reply