mirror of
https://github.com/laspavel/mikrotik-scripts.git
synced 2025-06-20 21:35:45 +02:00
Add resolve-novpn script
This commit is contained in:
parent
379d57122e
commit
e2248b6e0b
1 changed files with 9 additions and 0 deletions
9
resolve-novpn.rsc
Normal file
9
resolve-novpn.rsc
Normal file
|
@ -0,0 +1,9 @@
|
|||
:local domains {"example.com"; "www.example.com"; "checkout.example.com"}
|
||||
/ip firewall address-list remove [/ip firewall address-list find list=novpn-list]
|
||||
:foreach domain in=$domains do={
|
||||
:do {
|
||||
:local resolvedIPs [:resolve $domain]
|
||||
/ip firewall address-list add list=novpn-list address=$resolvedIPs timeout=1h
|
||||
} on-error={:log warning "Failed to resolve $domain"}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue