How to connect Fortigate console from Linux

by Daniel Pham
Published: Updated:

How to connect Fortigate console from Linux? Fortigate is one of the best physical firewalls in the world today. For system administrators, working with Fortigate is not to be missed.

What is minicom?

Minicom is a command-line application that allows you to connect to serial ports to communicate with physical devices such as routers, switches, and firewalls.

Why do I mention Minicom? This is because I will use this tool to connect to the Fortigate firewall.

To install Minicom on Ubuntu or Linux Mint, type the following command.

sudo apt-get install minicom

Connect your computer to the Fortigate firewall

Yes, now you need a console cable to connect your computer to Fortigate.

It looks like this.

How to connect Fortigate console from Linux
Console cable USB to RJ45.

On the Fortigate firewall that supports the USB MGMT port and Console port, connect to the Console port of the device, port number 3 in the image below.

How to connect Fortigate console from Linux
Connect to port console in fortigate firewall.

Connect Fortigate console from Linux

Now open up the terminal and type the command below to see which device is connected to the serial port on your computer.

danie@danie-laptop:~$ dmesg | grep tty
[    0.083833] printk: console [tty0] enabled
[    5.079930] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0

And you can see that the firewall is connecting to usb 1-2, so the path to the serial port is /dev/ttyUSB0.

Then type the following command to run the minicom tool.

sudo minicom -s /dev/ttyUSB0

Next, use the up & down keys to navigate to the Serial port setup menu.

            +-------[configuration]-------+
            | Filenames and paths         |
            | File transfer protocols     |
            | Serial port setup           |
            | Modem and dialing           |
            | Screen and keyboard         |
            | Save setup as _dev_ttyUSB0  |
            | Save setup as..             |
            | Exit                        |
            | Exit from Minicom           |
            +-----------------------------+

Then you press the A key to change the path to the serial port connected above.

    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 9600 8N1                                  |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+

Press the E key to change the Bits number to match the Fortigate firewall.

Depending on the different device type, specifications may differ. With the Fortigate firewall, note the Bits setting is 9600 8N1 and you can read more at this page.

Then press Enter to exit port setting. Then scroll down to the menu Save setup as _dev_ttyUSB0 to save the configuration.

Finally, you scroll down and click Exit to return to the command manipulation window of minicom.

The terminal windows will look like this, you can type the fortigate commands on this.

Welcome to minicom 2.7.1

OPTIONS: I18n                                                                
Compiled on Aug 13 2017, 15:25:34.                                           
Port /dev/ttyUSB0, 13:17:34                                                  
                                                                             
Press CTRL-A Z for help on special keys                                      
                                                                             
                                                                             
                                                                             
FG100D3G12800663 #

Conclusion

These are all steps for you to connect to the Fortigate console from a Linux computer. You know, most of the instructions on the internet guide you to connect from a Windows computer, quite a bit for Linux. I hope this article can be helpful for those who are using Linux.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.