Skip to content

Instantly share code, notes, and snippets.

@iav
Created August 21, 2024 19:09
Show Gist options
  • Save iav/9cc3d1bc94706f246b677d709a21fe3e to your computer and use it in GitHub Desktop.
Save iav/9cc3d1bc94706f246b677d709a21fe3e to your computer and use it in GitHub Desktop.
add opendns resolver for domains
#!/bin/sh
ip l a dns-opennic type dummy
ip l s dns-opennic up
ip -6 a a fe80::53/64 dev dns-opennic
resolvectl dns dns-opennic 51.158.108.203 51.77.149.139 2001:41d0:404:200::976
resolvectl domain dns-opennic ~bbs ~chan ~cyb ~dyn ~epic ~geek ~gopher ~indy ~libre ~neo ~null ~o ~oss ~oz ~parody ~pirate
resolvectl default-route dns-opennic false
#make networkmanager not showing a popup that a new device is up
nmcli device set dns-opennic managed no
#just to make resolvectl take this interface. ::1 does not work, but ::2 should not interfere with something the next 0.2 seconds
ip -6 a a ::2/128 dev dns-opennic
sleep 0.2
ip -6 a d ::2/128 dev dns-opennic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment