Description
This article describes how to run the show, diagnose, execute, and get CLI commands for one VDOM from another VDOM.
Solution
Sometimes, it is more convenient to run these CLI commands and obtain the outputs without switching to global mode and to another VDOM.
On a FortiGate, it is possible it run these CLI commands by using the 'sudo' prefix:
config vdom
edit root
fgvm04 (root) # sudo ?
<global/vdom-name> global or virtual domain name
global
VDOM1
root
For example, it is not possible to run 'execute ping' commands on global mode. To perform a ping, it is necessary to switch to VDOMs. However, this command can be run in the global mode by using the 'sudo' prefix:
config global
execute ping 8.8.8.8
command parse error before 'ping'
Command fail. Return code -61
sudo root execute ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=55 time=1.9 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=1.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=1.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=1.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=1.8 ms
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 1.7/1.8/1.9 ms
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.