Showing posts with label dns. Show all posts
Showing posts with label dns. Show all posts

Sunday, 9 August 2026

Forcing Google DNS server traffic to local DNS

 Add Google DNS servers as VIPs to loopback interface on local DNS server



Add static routes on router to redirect traffic towards them (192.168.0.108 is my local DNS server)

Then test!!

I’ve added the routes on a single host because I can’t add static routes on the superhub, but the principle is the same and it did work on my previous router.

You can tell it’s working by sending a request for an internal hostname to “Google DNS” which proves your local DNS is resolving the request and not sending it out to public DNS. Also a traceroute shows traffic is being routed to your local DNS..

If it doesn’t work couple of things to check.

  • Make sure local DNS server is configured to respond to requests on all interfaces
  • Check if IP forwarding is enabled on DNS server  
    • cat /proc/sys/net/ipv4/ip_forward 
    • It is set on my server but can’t remember if it was enabled to make this work or not. 
  • Check if RP filter is set to loose (2) on eth0 & lo interfaces. This might be required to get it to work. 
    •  cat /proc/sys/net/ipv4/conf/lo/rp_filter
    •  cat /proc/sys/net/ipv4/conf/eth0/rp_filter
    • Again this is set on my server but don't remember why it got set.
  • Of the 2 suggestions above, Co-Pilot suggests RP filter is the one that is probably needed.






Friday, 11 May 2012

Cisco Network Registrar via the CLI

Can't get the GUI running then use the command line.
/export1/nwreg2/usrbin/nrcmd 
List the zones available:
nrcmd> zone list 
List the records in the knon.dtv zone:
nrcmd> zone knon.dtv listrr 
List the records in a reverse lookup zone:
nrcmd> zone 10.in-addr.arpa listrr 
This example adds myhost.knon.dtv / 10.2.3.4.
Add the hostname to the knon.dtv zone:
nrcmd> zone knon.dtv. addhost myhost 10.2.3.4 
Add the corresponding PTR record (done automatically with the GUI):
nrcmd> zone 10.in-addr.arpa. addrr 4.3.2 PTR myhost.knon.dtv
Tip: To remove resource records
nrcmd> zone 10.in-addr.arpa. removerr 4.3.2.10.in-addr.arpa

Save your records & reload the DNS to activate:
nrcmd> save
nrcmd> dns reload
To force the secondary DNS to update the zone with your new records, log onto it and execute:
nrcmd> zone knon.dtv forceXfer secondary
nrcmd> zone 10.in-addr.arpa forceXfer secondary
 Don't forget to refresh the secondary DNS caches to pick up the new records:
rndc reload lang.dtv
rndc reload 10.in-addr.arpa