Regards!
i have two address list ,addresslist1 and addresslist2 .
i want to export address list one , i search and did some solutions but didnt work .
anybody have solution ?
version is 7.15.3
Regards!
i have two address list ,addresslist1 and addresslist2 .
i want to export address list one , i search and did some solutions but didnt work .
anybody have solution ?
version is 7.15.3
/ip/firewall/address-list export where list=“your_list”
unfortunately it didnt work .
/ip/firewall/address-list export where list="ConfirmedAttack"
# 2024-08-05 08:38:19 by RouterOS 7.15.3
# software id =
#
when i use export no ip return ,but when i use print instead of export it show.
/ip/firewall/address-list print where list="ConfirmedAttack"
Flags: X - disabled, D - dynamic
# LIST ADDRESS CREATION-TIME TIMEOUT
0 D ConfirmedAttack 154.212.141.187 2024-08-05 07:35:17 4w1d23h33m42s
1 D ConfirmedAttack 79.110.62.180 2024-08-05 07:35:48 4w1d22h54m15s
2 D ConfirmedAttack 127.0.0.1 2024-08-05 07:35:51 4w1d23h59m18s
3 D ConfirmedAttack 185.242.226.47 2024-08-05 07:36:21 4w1d23h1m29s
4 D ConfirmedAttack 154.213.184.25 2024-08-05 07:36:26 4w1d23h42m36s
5 D ConfirmedAttack 185.191.126.213 2024-08-05 07:36:29 4w1d22h55m17s
6 D ConfirmedAttack 167.94.145.19 2024-08-05 07:36:32 4w1d22h54m58s
7 D ConfirmedAttack 103.56.61.144 2024-08-05 07:37:00 4w1d22h55m26s
8 D ConfirmedAttack 167.94.146.29 2024-08-05 07:37:23 4w1d22h55m50s
9 D ConfirmedAttack 80.82.77.144 2024-08-05 07:37:42 4w1d23h43m58s
10 D ConfirmedAttack 167.99.4.134 2024-08-05 07:37:42 4w1d22h56m9s
11 D ConfirmedAttack 172.168.159.17 2024-08-05 07:39:04 4w1d22h57m31s
12 D ConfirmedAttack 104.209.40.179 2024-08-05 07:39:10 4w1d22h57m37s
13 D ConfirmedAttack 95.214.27.10 2024-08-05 07:39:29 4w1d23h59m3s
14 D ConfirmedAttack 176.111.174.29 2024-08-05 07:40:48 4w1d22h59m15s
15 D ConfirmedAttack 146.88.241.111 2024-08-05 07:41:17 4w1d22h59m44s
16 D ConfirmedAttack 71.6.199.23 2024-08-05 07:41:44 4w1d23h11s
17 D ConfirmedAttack 185.234.216.57 2024-08-05 07:42:06 4w1d23h33s
18 D ConfirmedAttack 40.85.152.219 2024-08-05 07:42:39 4w1d23h1m6s
address lists are huge and i think i should use script .
Those are dynamic entries, of course export will not export them.
is any way to solve it?
i should fetch these ip list to another router .
its very important for me and whole of my project stucked.
Either you save the IPs in the address list as static or you export them as:
/ip firewall address-list print file=export.txt where list=“mylist”
but then you have to create a script specifically to import them from the other side.
Or you create a script in ssh that for each dynamic IP launches the command to add the IP remotely.
i done
first i removed Dynamic and then export these ip
:foreach i in=[/ip firewall address-list find dynamic=yes] do={
:local a [/ip firewall address-list get $i address]
/ip firewall address-list remove $i
/ip firewall address-list add address=$a list=SeparBadIP dynamic=no
/ip firewall address-list export file=SeparBadIP where list=SeparBadIP
}
Wouldn’t it have been easier to change what writes the IPs in the list, so that it did it statically?
Then if every time it exports the same IPs, the import could fail in the destination if one is already present.