Page 1 of 1

CopyFrom - can't find in docs

Posted: Tue Oct 11, 2022 1:55 pm
by linerov
Hi All,

Looking at modifying NAT rules from CLI level came across:
/ip firewall nat add copy-from=

CopyFrom ::= see documentation
With that said, can't find anything about CopyFrom in documentation. (https://www.google.com/search?q=%22Copy ... krotik.com)
Could anyone share what it is for and how to use it?
Suspicion is that it is to use as template other existing item, though selected by name of some other ID?


Thanks!

Re: CopyFrom - can't find in docs

Posted: Tue Oct 11, 2022 2:27 pm
by nostromog
Copy-From= will copy an existing "something" (route, rule, an element of the list that you are adding to). You need to specify the number of the element you want to copy.

Typically you will add in the line the changing attributes, like port=22 if the copied one had port=80, or similar.

It is typically used with place-before= where you specify the number of the element before which the one that you add will be inserted.