How would one go about removing all entries in the web proxy via script? I’ve tried using several variations of the /ip proxy access remove command (some of which are listed below) but I can’t seem to find one that will always work for sure. Anyone have a surefire way to remove everything on the list so that the script can start from scratch each time it runs?
Things I’ve tried:
/ip proxy access remove [/ip proxy access find src-address=““]
/ip proxy access remove[/ip proxy access find comment=””]
/ip proxy access remove *
/ip proxy access remove all
Any ideas?
Try this:
/ip proxy access
remove [find action=deny]
remove [find action=allow]
Also this (removes all entries in /ip proxy access tab):
:foreach w in=[/ip proxy access find] do={
/ip proxy access remove $w
}
isn’t
/ip proxy access
remove [find]
working? =)
Yeah, but it fails when there are no entries in the list. What I finally found was this gem:
/ip proxy access { :foreach r in=[find] do={ remove $r }}
Thanks for the help though guys.
Glad it worked for you.