Skip to main content
Gix-L
New Member
Oct 9, 2025 10:38 AM UTC
Question

Rename FortiProxy based on FortiManager name (CLI/TCL?)

Hello,

 

I'm a bit newbie in Forti environment, but I'm trying to rename the appliance name with the "Device Name" entered in FortiManager:

 

 
 

2025-10-09_12h29_52.png

 

 

I thought about CLI:

config system global
    set hostname ${Hostname}
end

but for sure ${Hostname} is unknown

 

 

 

I thought about TCL:

#!
puts [exec_ondb "/adom/FortiProxy/device/." "
config system global
    set hostname XXX
end
" "# "]

But with what replace XXX ?

 

Maybe there is another easy solution?

 

Thanks in advance

1 reply

singhl
Staff
Staff
Oct 9, 2025 9:39 PM UTC

In this case Jinja variables for Device database will be best. See this guide for list of variables.

You can create a cli template with type jinja and use config script like this:


config system global
set hostname {{DVMDB.name}}
end


Here DVMDB.name is "Device Name" in the Device manager.

Regards,
Lovepreet

Translate
Lovepreet Singh
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024