Configure and secure remote access to the Fortinet firewall using HTTPS for GUI and SSH for CLI. Only specific internal devices (like Inside PC) should be allowed to access Fortinet admin services.
Inside network: 192.168.1.0/24
Inside PC IP: 192.168.1.10
We will:
● Enable HTTPS and SSH on port2 (internal interface)
● Create an admin access rule
● Restrict access to Inside PC only
From GUI:
1. Go to Network > Interfaces
2. Select port2 and click Edit
3. In the Administrative Access section, check:
✅ HTTPS
✅ SSH
(Uncheck others if not needed)
4. Click OK
From CLI:
! config system interface edit "port2" set allowaccess https ssh next end ! |
Note: This allows HTTPS and SSH connections on the interface IP (192.168.1.1)
From GUI:
1. Go to Policy & Objects > Addresses
2. Click Create New and select Address
● Name: Inside-PC
● Type: Subnet
● IP: 192.168.1.0/24
● Interface: Any
3. Click OK
From CLI:
! config firewall address edit "Inside-PC" set subnet 192.168.1.10 255.255.255.255 next end ! |
Local-In policies are used to control access to Fortinet itself, not transit traffic.
From CLI:
! config firewall local-in-policy edit 1 set intf "port2" set srcaddr "Inside-PC" set dstaddr "all" set service "HTTPS""SSH" set action accept next end |
Note: This step is optional unless you're managing stricter control. In most basic labs, enabling admin access on the interface is enough.
From Inside PC:
1. Open a browser and go to: https://192.168.1.1
2. Accept the certificate warning → login to Fortinet GUI
Open command prompt:
ssh admin@192.168.1.1 |
You should be able to access the CLI if the credentials are correct