Skip to content

Instantly share code, notes, and snippets.

@MrXermon
Created May 24, 2020 16:25
Show Gist options
  • Save MrXermon/248f11f41d4659dfee0cb2920299bc80 to your computer and use it in GitHub Desktop.
Save MrXermon/248f11f41d4659dfee0cb2920299bc80 to your computer and use it in GitHub Desktop.
Update VyOS Tunnel IP by fetching DNS entrys.
#!/bin/vbash
IP=`dig +short $1 A`
IF=$2
source /opt/vyatta/etc/functions/script-template
configure
set interfaces tunnel $IF remote-ip $IP
commit
save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment