Skip to content

Instantly share code, notes, and snippets.

@deverton
Last active January 5, 2018 01:13
Show Gist options
  • Save deverton/f22e1ce8e1e011495563 to your computer and use it in GitHub Desktop.
Save deverton/f22e1ce8e1e011495563 to your computer and use it in GitHub Desktop.
Host Overrides in Gargoyle/OpenWRT
  1. SSH to router
  2. uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/override.hosts
  3. echo 'fqdn.example.com 127.0.0.1' >> /etc/override.hosts
  4. /etc/init.d/dnsmasq restart

Should result in

  $ nslookup fqdn.example.com
  Server:    127.0.0.1
  Address 1: 127.0.0.1 localhost

  Name:      fqdn.example.com
  Address 1: 127.0.0.1 fqdn

  $ nslookup fqdn.example.com @8.8.8.8
  Server:    127.0.0.1
  Address 1: 127.0.0.1 localhost

  Name:      fqdn.example.com
  Address 1: 93.184.216.34 fqdn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment