Init DNS switching scripts

This commit is contained in:
Joey Hafner 2023-02-14 17:04:01 -08:00
parent 642133d3d0
commit ee610af079
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#!/bin/vbash
# https://docs.vyos.io/en/equuleus/automation/command-scripting.html
source /opt/vyatta/etc/functions/script-template
configure
delete service dns forwarding name-server 192.168.1.21
delete service dns forwarding name-server 192.168.1.22
set service dns forwarding name-server 1.1.1.1
delete service dhcp-server shared-network-name LAN name-server 192.168.1.21
delete service dhcp-server shared-network-name LAN name-server 192.168.1.22
set service dhcp-server shared-network-name LAN name-server 192.168.1.1
commit
save
exit

View File

@ -0,0 +1,16 @@
#!/bin/vbash
# https://docs.vyos.io/en/equuleus/automation/command-scripting.html
source /opt/vyatta/etc/functions/script-template
configure
delete service dns forwarding name-server 1.1.1.1
set service dns forwarding name-server 192.168.1.21
set service dns forwarding name-server 192.168.1.22
delete service dhcp-server shared-network-name LAN name-server 192.168.1.1
set service dhcp-server shared-network-name LAN name-server 192.168.1.21
set service dhcp-server shared-network-name LAN name-server 192.168.1.22
commit
save
exit