0

I am trying to execute the below command on fortigate using my php script using library phpseclib.

 config global

 exec batch start

 conf vdom
 edit [PORT_VDOM]

 conf firewall addrgrp  
 edit "[GROUP_NAME]"  
 set member "[MEMBERS]"
 end  
 exec batch end

I am executing the above command using ssh in a php script. It does edit the group successfully if I add few members. If I add more members, it is not editing the group.

however, If I execute the set member command with more members directly on the cli, it is editing successfully. Issue is occurring just when the command runs from the script only when the set member command has about 40 members.

Dilani
  • 533
  • 1
  • 6
  • 22
  • Is this the same command you mentioned in https://stackoverflow.com/q/55098095/569976 ? If so my suggestion in that post might be applicable to this one as well. Are the members comma separated or are you "setting" each of them with their own dedicated `set member "[MEMBERS]"` command? – neubert Mar 12 '19 at 13:30
  • @neubert members are sperated by space. set member "MEMBER A" "MEMBER B" "MEMBER C" – Dilani Mar 13 '19 at 10:34
  • do the member names have spaces in them? 'cause "MEMBER A" kinda counts as two members lol – neubert Mar 13 '19 at 19:57
  • 1
    Issue ended being in the path between firewall and the server. all good with the script and phpseclib – Dilani May 01 '19 at 09:29

0 Answers0