Community discussions

MikroTik App
 
linerov
just joined
Topic Author
Posts: 11
Joined: Mon Jan 17, 2022 1:41 am

CopyFrom - can't find in docs

Tue Oct 11, 2022 1:55 pm

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!
 
nostromog
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Jul 18, 2018 3:39 pm

Re: CopyFrom - can't find in docs

Tue Oct 11, 2022 2:27 pm

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.