Init DNS switching scripts
This commit is contained in:
parent
642133d3d0
commit
ee610af079
16
router/scripts/dns_cloudflare.sh
Normal file
16
router/scripts/dns_cloudflare.sh
Normal 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
|
16
router/scripts/dns_pihole.sh
Normal file
16
router/scripts/dns_pihole.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user