Skip to main content
nalexiou
Staff & Editor
Staff & Editor
July 2, 2025

Technical Tip: How to move NAC policies via CLI

  • July 2, 2025
  • 0 replies
  • 905 views
Description This article describes how to change the order of the NAC-policies by using the CLI.
Scope FortiOS. 
Solution

In cases where the GUI cannot be used, the NAC policies order can be modified via CLI by using the commands: 'move <policy-name> before <policy name>'  and 'move <policy-name> after <policy name>'.

 

For example to move NAC policy test1 under test3 the commend move "test1" after "test3" can be used:

 

FGT (nac-policy) # show
config user nac-policy
    edit "test1"
        set switch-fortilink "fortilink"
    next
    edit "test2"
        set switch-fortilink "fortilink"
    next
    edit "test3"
        set switch-fortilink "fortilink"
    next
end
 
FGT (nac-policy) # move "test1" after "test3"
 
FGT (nac-policy) # show
config user nac-policy
    edit "test2"
        set switch-fortilink "fortilink"
    next
    edit "test3"
        set switch-fortilink "fortilink"
    next
    edit "test1"
        set switch-fortilink "fortilink"
    next
end
    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.