Answers for "mikrotik address list log into file"

0

mikrotik address list log into file

{
	:local listName "Server"; #change this
	:local fileName "exported.rsc"; #change this
	:local buffer;

	:global filteredList [/ip firewall address-list print as-value where list=$listName && dynamic=no];
	:foreach i in=$filteredList do={
		:set $buffer ($buffer."add list=".$listName." address=".$i->"address"."; ");
	};
	/file print file=$fileName where name="";
	:delay 1s;
	:set $buffer ("/ip firewall address-list; ".$buffer);
	/file set $fileName contents=$buffer;
}
Posted by: Guest on November-21-2020
0

mikrotik address list log into file

/ip firewall address-list print file=ssh_blacklist where list=ssh_blacklist
Posted by: Guest on November-21-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language