Advertisement
Skip to content

DNS poisoning vs DNS hijacking after router reset

By Published 13 min read

On this page (11 sections)
  1. The short version
  2. DNS poisoning and DNS hijacking change different things
  3. A router reset has limits
  4. Nslookup and dig show the resolver and records
  5. Consistent redirects point toward the DNS path
  6. DNS redirection differs from HTTP redirection
  7. Check DNS settings on every layer
  8. Fix caches, settings, and firmware in the right order
  9. Use an off-network test before blaming the server
  10. Secure the network after the diagnosis
  11. Questions people still ask

In short: DNS poisoning gives a client an incorrect DNS record, often for a particular hostname. DNS hijacking changes which resolver answers your queries, or redirects traffic through another service. Check the resolver, returned A and AAAA records, and results from mobile data or a VPN. A private resolver address is not automatically malicious.

Part of our guide on recover account without email

A router reset can remove a bad setting, but it cannot repair every layer an attacker changed.

At a glance
What poisoning changesA cached or supplied DNS record for one or more hostnames
What hijacking changesThe resolver setting, DNS path, or traffic destination
What a soft reboot doesPower-cycles equipment and clears some volatile state
What a factory reset doesRestores stored settings to defaults and usually clears configuration caches
What a firmware reflash doesReplaces router software from a trusted vendor image

The short version

  • Poisoned records can affect particular names, while a hijacked resolver may redirect many unrelated names consistently
  • A factory reset usually removes router configuration and volatile cache data, but it cannot remove compromised firmware or bootloader changes
  • In nslookup, Server identifies the resolver queried; Address can identify that resolver or show returned records, depending on the output section
  • A private DNS address often belongs to a router, Pi-hole, or another intentional local resolver
  • Compare wired or Wi-Fi results with mobile data, public Wi-Fi, or a trusted VPN before deciding the problem is local
  • Reinstall official firmware only after checking the vendor model, hardware revision, release notes, and published checksum

DNS poisoning and DNS hijacking change different things

Your browser needs an IP address before it can contact a hostname such as google.com. DNS supplies A records for IPv4 and AAAA records for IPv6. The resolver might be your router, ISP, a public service, or a local DNS program.

DNS poisoning means a client receives an incorrect record for a name. The bad answer might sit in a router cache, operating-system cache, application cache, or an upstream resolver. A poisoned answer can affect one hostname while other names resolve normally.

DNS hijacking describes control of the DNS path or resolver choice. Malware, a changed router setting, a rogue DHCP server, or compromised equipment can send queries to an unwanted resolver. That resolver can answer many unrelated names with selected addresses.

The terms overlap in everyday reports. Use the evidence instead. Check which server answered, which records it returned, and whether an independent network sees the same result. We go through importance of 2fa security step by step elsewhere on the site.

A router reset has limits

Router, laptop, and phone showing a DNS query, resolver, and returned address
Router, laptop, and phone showing a DNS query, resolver, and returned address

A soft reboot means removing power, waiting briefly, and powering the router back on. It restarts software and clears some volatile memory. It does not restore DNS settings, erase stored passwords, or replace firmware.

A factory reset restores the router's saved configuration to its default state. It usually removes custom DNS settings, DHCP changes, wireless settings, and volatile cache data. The exact behavior depends on the manufacturer and model.

A factory reset does not guarantee removal of malicious firmware or a persistent change in bootloader or read-only storage. It also cannot clear caches held by phones, laptops, browsers, or other network equipment. If that sounds like your situation, read up on hotmail spoofed emails continue next.

A firmware reflash replaces the router's installed software with an official image. It requires the exact model and hardware revision. A failed or incorrect image can disable the router, so follow the vendor procedure carefully.

Use a soft reboot for a stalled service or a temporary fault. Use a factory reset for an unknown configuration. Consider a firmware reflash when the vendor documents a security issue, settings return after reset, or integrity checks fail.

After either reset, record the router's DNS and firmware values. Change the administrator password, disable remote administration, review DHCP settings, and update from the vendor's official support page. Before you commit to anything, it is worth looking at website security after malware cleanup.

Nslookup and dig show the resolver and records

The command nslookup asks a DNS resolver to resolve a hostname. Its answer can include A records for IPv4, AAAA records for IPv6, and the resolver's name or address. It does not prove the web server is safe.

Run nslookup google.com on Windows, macOS, or Linux. A normal result has a structure like this, though names, addresses, and formatting vary:

Server: router.lan Address: 192.168.1.1 Non-authoritative answer: Name: google.com Addresses: 142.251.x.x 2a00:1450:4000::x There is more on avast account wont let me sign in in a separate guide.

Server identifies the resolver nslookup contacted. The following Address line identifies that resolver. The later Addresses lines are records returned for google.com. A private Server address often means your router or a local resolver forwards queries.

Do not treat 192.168.x.x, 10.x.x.x, or 172.16.x.x through 172.31.x.x as automatic proof of an attack. Check the router page and see whether you intentionally use the router, Pi-hole, AdGuard Home, or another local forwarder.

Run nslookup without a hostname for an interactive prompt. Type server to display or change the resolver, then type set type=A and google.com. Repeat with set type=AAAA. Exit with Ctrl-C or exit. There is more on how to avoid roaming fees abroad in a separate guide.

On macOS or Linux, run dig google.com. The answer may include lines like this:

;; SERVER: 192.168.1.1#53(192.168.1.1) ;; ANSWER SECTION: google.com. 300 IN A 142.251.x.x

The SERVER line shows the resolver used. The ANSWER SECTION shows the returned record and its TTL. Run dig +short google.com A and dig +short google.com AAAA for compact answers.

Use dig +trace google.com to follow delegation from the root through the relevant top-level domain to authoritative servers. It can reveal a local resolver's altered answer, but it needs direct DNS access and may fail on restricted networks.

A Google A record can vary by region, time, and load-balancing. Do not judge a result by one expected address. Compare the resolver, name, record type, TTL, and independent result.

  1. Run nslookup google.com and copy the Server, resolver Address, and returned Addresses lines
  2. Run nslookup -type=A google.com and nslookup -type=AAAA google.com
  3. Run dig +short google.com A and dig +short google.com AAAA on macOS or Linux
  4. Run dig +trace google.com when direct DNS queries are allowed
  5. Compare results with mobile data, public Wi-Fi, or a trusted VPN
  6. Check the authoritative path before calling a changing CDN address poisoned

Consistent redirects point toward the DNS path

A DNS-based redirect often gives the same destination for many unrelated hostnames. Test several names, such as a search site, a news site, and a software vendor. Record the returned A and AAAA records instead of relying only on browser behavior.

Identical answers for many unrelated names are a strong sign of a redirecting resolver or DNS interception. The result is not conclusive. CDNs, captive portals, enterprise filters, parental controls, and legitimate load-balancing can produce shared or changing addresses.

Poisoned cache data can affect particular names. One domain might return an incorrect address while unrelated domains resolve normally. A compromised resolver can also return incorrect records selectively, so the pattern alone cannot identify the mechanism.

Run the same commands from mobile data or public Wi-Fi. A VPN provides another comparison, although the VPN provider becomes the resolver path. If only your home network sees the redirect, inspect the router, DHCP, local resolver, and connected devices.

If every network sees the same redirect, check the hostname, browser extensions, proxy settings, application configuration, and the destination server. A server-side redirect does not require DNS poisoning.

DNS redirection differs from HTTP redirection

Router showing a power cycle, factory reset button, and firmware update screen
Router showing a power cycle, factory reset button, and firmware update screen

DNS-level redirection happens before the browser contacts the website. The resolver returns an address controlled by another service, or an interceptor alters the reply. Nslookup and dig can expose this difference.

HTTP-level redirection happens after a connection reaches a web server or proxy. The browser may receive an HTTP 301 or 302 response, or a malicious proxy may rewrite traffic. DNS can look correct while the page still moves elsewhere.

Check the address bar, certificate, and response headers. On macOS or Linux, run curl -I https://example.com. On Windows, use curl.exe -I https://example.com. A Location header shows an HTTP redirect, but inspect certificates before following it.

A proxy can alter traffic even when DNS and certificates look normal on an unencrypted connection. Review operating-system proxy settings, browser proxy settings, VPN profiles, and installed certificates. HTTPS certificate warnings need immediate attention.

Test the same hostname from mobile data and through a trusted VPN. A redirect that follows the hostname on every network may come from the website or account. A redirect limited to one network suggests local DNS, proxy, or captive-portal interference.

Check DNS settings on every layer

Open the router's administration page using its documented local address. Review WAN DNS, LAN DHCP DNS, IPv6 DNS, static routes, proxy settings, and remote-management access. A router can advertise a different resolver over IPv6 while IPv4 looks clean.

On Windows, run ipconfig /all. Read DNS Servers under the active adapter. Run netsh interface ip show dns to list configured IPv4 DNS servers. Run nslookup to see the resolver actually answering the query.

On macOS, run scutil –dns and networksetup -getdnsservers Wi-Fi. Replace Wi-Fi with the active service name. The output can show multiple resolvers supplied by DHCP, IPv6, VPN software, or local services.

On Linux, run resolvectl status or read /etc/resolv.conf. NetworkManager, systemd-resolved, VPN software, and containers can each affect which resolver receives a query.

On Android, review Settings > Network and internet > Internet, then the network's details. Private DNS can use an automatic, provider-hostname, or off setting. Menu names vary by manufacturer and Android release.

On iPhone or iPad, open Settings > Wi-Fi, tap the network, and inspect Configure DNS. Also review VPN and device-management profiles. A profile can supply DNS settings even when Wi-Fi appears normal.

Check a private resolver address against your own setup. Look for a router service, Pi-hole, AdGuard Home, enterprise gateway, or VPN. Confirm its upstream servers in the relevant administration page before changing it.

  1. Check router WAN, DHCP, IPv6, proxy, and remote-management settings
  2. Run the operating-system command matching your computer
  3. Review VPN, proxy, private DNS, and management profiles
  4. Identify every private resolver before calling it malicious
  5. Compare the active resolver with an off-network result

Fix caches, settings, and firmware in the right order

A browser cache is not the same as the operating system's DNS cache. Clearing browser data will not necessarily remove an OS, router, or local-forwarder record. Follow the system's documented cache procedure.

On Windows, run ipconfig /flushdns from an elevated Command Prompt. On macOS, restart the DNS-related service or use the current Apple-supported cache procedure for your release. Linux systems differ, so use resolvectl flush-caches when systemd-resolved is active.

A phone usually clears resolver state when its network connection is renewed or the device restarts. Network Settings reset is a larger action. It removes saved Wi-Fi networks, VPN settings, and other network configuration, so document passwords first.

Set DNS only after identifying the layer supplying the unwanted value. If the router advertises the wrong server, fix the router. If one device has a manual value or profile, fix that device. Then repeat nslookup or dig.

Download firmware only from the vendor's support site. Confirm the model and hardware revision. Compare the vendor's published SHA-256 checksum with a locally calculated checksum, using sha256sum on Linux or Get-FileHash on PowerShell.

Reinstall official firmware through the vendor's documented recovery or update process. Do not use an image from a forum or another hardware revision. If settings return after a verified reflash, disconnect the router and contact the manufacturer or replace it.

Factory-reset the router after preserving evidence if possible. Photograph suspicious settings, save command output, and note times. A reset can destroy useful evidence, but leaving an exposed router online can worsen the incident.

  • Soft reboot: power-cycle when software is stuck; settings and firmware remain
  • Factory reset: restore defaults when configuration is unknown; reconfigure securely afterward
  • Firmware reflash: replace suspected software using a verified official image
  • Flush the relevant device cache after correcting the resolver
  • Change router administration and Wi-Fi credentials after recovery
  • Check IPv4, IPv6, DHCP, VPN, proxy, and private DNS settings

Use an off-network test before blaming the server

Terminal showing Server, Address, ANSWER SECTION, and SERVER output
Terminal showing Server, Address, ANSWER SECTION, and SERVER output

Turn off Wi-Fi on a phone and use mobile data. Resolve the same hostname with a browser or a DNS testing app. A laptop can use public Wi-Fi, but avoid entering sensitive credentials on an untrusted network.

Run the same A and AAAA queries at home, on mobile data, and through a trusted VPN. Record the resolver, returned records, response code, and redirect destination. Time and region can change CDN answers.

If the home network alone returns a different address, inspect local DNS and router settings. If every network returns the same address but the browser redirects, inspect HTTP behavior, the website, or the device.

A VPN test has limits. Some VPNs use split DNS, block DNS outside the tunnel, or send different traffic through regional servers. Confirm the VPN's DNS behavior before treating its result as an authority.

Secure the network after the diagnosis

Change the router administrator password and Wi-Fi passphrase from a trusted device. Disable WPS and remote administration unless you need them. Update the router using the vendor's official process.

Review connected clients and remove unknown devices. Check DHCP reservations, port forwarding, dynamic DNS, IPv6 rules, and installed certificates. Inspect Pi-hole, AdGuard Home, VPN, and parental-control settings if you use them.

Run reputable malware scans on devices with manual DNS changes or repeated redirects. A single affected device can indicate malware, an unwanted browser extension, or a management profile rather than a router attack.

If DNS settings revert after cleaning, isolate the device. Restore it from a known-clean backup or use the manufacturer's recovery process. Change email and financial passwords from a clean device, then enable multifactor authentication.

Keep command output and router logs if you plan to report the incident. Your ISP, router vendor, security team, or local authority may need timestamps, resolver addresses, destination addresses, and firmware details.

Questions people still ask

What is the difference between DNS poisoning and DNS hijacking?

Poisoning means one name receives a false record while the resolver stays unchanged. Hijacking means DNS settings or traffic are redirected to a different resolver. Check Server, the ANSWER SECTION, and a trusted off-network result.

What output points to DNS poisoning?

Run dig example.com and record the ANSWER SECTION. A suspicious result might show example.com. 30 IN A 198.51.100.44, while dig +trace example.com ends at the authoritative server with another address. The short TTL and mismatched answer support poisoning, but verify the domain's legitimate records.

What output points to DNS hijacking?

Run nslookup example.com. An unexpected Server: 192.168.1.77 or a resolver outside your router, VPN, or organisation points toward hijacking. If several unrelated domains return the same address, check DHCP, router DNS, IPv6 DNS, VPN profiles, and proxy settings.

What should I check after a router reset?

Run ipconfig /all on Windows, scutil --dns on macOS, or resolvectl status on Linux. Then run nslookup example.com, dig example.com, and curl -I https://example.com. If Location: appears, the web server sent an HTTP redirect. A wrong DNS answer changes the destination earlier.

What is the fastest response flow, and where are the official instructions?

Save outputs, then compare the same name on home DNS and mobile data or a trusted VPN. If only one name differs, use dig +trace and clear the affected cache. If the resolver differs or many names redirect, inspect router DHCP, IPv6, VPN, and proxy settings. Use Microsoft’s ipconfig documentation, Apple’s scutil and DNS deployment guidance, the Linux resolvectl manual, and your router vendor’s reset and firmware-recovery instructions. Reflash only with the vendor image and documented checksum.

I have recovered home networks where a reset fixed stored settings, and others where a device or firmware kept changing DNS. The commands below separate those cases without treating every local resolver as hostile.