# FortiGate firewall - diable defaultgw on a port
###### tags: `fortigate`
If you forget to turn off the "Retrieve Default Gateway from server" and you stuck on login page of the FortiGate web interface, you may ssh to the FortiGate and do it from command line.
### get router table
```
get router info routing-table all
```
### config interface to disable set default gateway
```
# config system interface
(interface) # edit <type your port name>
(port name) # set defaultgw disable
(port name) # end
```
### Test ping to internet
```
execute ping 8.8.8.8
```
### examples
```
FGVM000000107148 # config system interface
FGVM000000107148 (interface) # edit port3
FGVM000000107148 (port3) # set defaultgw disable
FGVM000000107148 (port3) # end
```