Allow Mikrotik Winbox

Posted in How Did I Do That?

Setup the firewall so that it can be accessed from a certain IP


/ip firewall address-list
add address=142.196.201.49 list=erik
/ip firewall filter
add action=accept chain=input comment="Accept Mikrotik Winbox" dst-port=8291 \
in-interface=ether1-WAN protocol=tcp src-address-list=erik
Script:
:local resolvedIP [:resolve "myadd.duckdns.org"];
:foreach a in=[/ip firewall address-list find list=erik] do={
:log info $resolvedIP;
/ip firewall address-list set $a address=$resolvedIP;
}