Community discussions

MikroTik App
 
adamgardner2
just joined
Topic Author
Posts: 12
Joined: Fri Aug 03, 2018 5:04 am

IPSec Policy cannot get some attributes

Tue Sep 18, 2018 2:59 am

I can create an IPSec Policy from the shell or via the API, but, when trying to retrieve the current value of an existing policy, some items seem impossible to extract.

For example:
[test@Test] > /ip ipsec policy add action=encrypt comment=testing dst-address=0.0.0.0/0 src-address=0.0.0.0/0 sa-dst-address=0.0.0.0 sa-src-address=0.0.0.0 template=yes group=default 
[test@Test] > :put [/ip ipsec policy get [find comment=testing] value-name=src-address]                                                 
0.0.0.0/0                                
[test@Test] > :put [/ip ipsec policy get [find comment=testing] value-name=action]

[test@Test] >
The only way I can get it to acknowledge what the action is (besides from the GUI) is to run
/ip ipsec policy edit [find comment=testing] action
and it will open up an editor for me to change the value of 'action', and the current value will in-fact be there. But obviously, this is no use for scripting or use via the API.

Am I missing something, or is this a bug? I run into the same problem with at least ipsec-protocols, sa-src-address and sa-dst-address as well.

Who is online

Users browsing this forum: brunolabozzetta, diamuxin and 29 guests