GitXplorerGitXplorer
a

dnsmasq-hack

public
0 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
27f63322f20355796f744eb77e8d6878a088a5bb

dnsmasq-hack

aawilliam committed 11 years ago

README

The README file for this repository.

These are some scripts for dealing with the problem of retaining local DNS resolution when connecting to a VPN. We run dnsmasq locally and use inotify to make sure that our local instance is always the first entry in resolv.conf. Changes to resolv.conf are scraped to configure dnsmasq to dynamically add and remove servers and domains.

To use:

  • Make sure you have inotifywait
  • Using dnsmasq.conf, setup dnsmasq to run at startup
  • Run dnsmask-hack.sh at startup however you wish.
    • It needs to be able to write /etc/resolv.conf
    • An @reboot crontab entry for root works
    • Run from systemd using the included .service file (note it assumes you've copied dnsmasq-hack.sh to /root/bin)

The kick script is meant to clear dnsmasq cache, which is often enough to get things working again when dnsmasq gets confused.

Feeback and improvements to Alex Williamson alex.williamson@redhat.com