Network Equipment

    How to Change DNS on Cisco IOS / IOS XE Routers

    By [FILL IN], [FILL IN] · Last updated

    Configure the router as DNS forwarder and DHCP server handing out FirewallDNS.

    Before you start

    You need a FirewallDNS account (see pricing). Sign in to your dashboard, register your public IP address and copy your DNS server addresses. Replace <FIREWALLDNS-PRIMARY> and <FIREWALLDNS-SECONDARY> below with them.

    Step by step

    1. Enter configuration mode with "configure terminal".
    2. Enable DNS lookup and set the name servers.
    3. Update the DHCP pool so clients receive the new DNS servers.
    4. Save with "write memory".

    IOS CLI

    conf t
    ip domain lookup
    ip name-server <FIREWALLDNS-PRIMARY> <FIREWALLDNS-SECONDARY>
    ip dns server
    ip dhcp pool LAN
     dns-server <FIREWALLDNS-PRIMARY> <FIREWALLDNS-SECONDARY>
    end
    write memory

    Verify it works

    1. Renew DHCP on a client (Windows: ipconfig /renew, macOS: reconnect Wi-Fi).
    2. Run nslookup example.com and check which server answered.
    3. Open the live log in your dashboard. New lookups should appear within seconds.

    Learn more

    Not protected yet?

    FirewallDNS costs $2.90 per device per month.