I've tried to mark the new connection coming from that interface, but that doesn't work :
Code: Select all
chain=mark new unseen action=add-dst-to-address-list address-list=public
address-list-timeout=0s in-interface=ADSL
1) I want the address list to be dynamic
2) The checkIP is not working, and therefore the address is constantly being added, even thought it exists
Here's the script:
Code: Select all
:local checkIP 0;
:local a
:foreach i in [/ip address find interface=ADSL] do={
:set a [/ip address get $i address]
}
:set checkIP [/ip firewall address-list pr count-only where address=$a]
:if ($checkIP = 0) do={
/ip firewall address-list add address=$a list=public
}
Thank you