Sophos XG: Setting up a serial connection

While messing around with bridging interfaces, I managed to make my Sophos XG device inaccessible from the network which obviously is a problem. Fortunately, my device (Qotom Q335G4) has a serial port which allows you to connect to the Sophos console using a serial/console cable. For Window users, you can find instructions on how to do this using this Knowledge Base article from the official Sophos website. This guide will show you the steps using Mac OS.

You will need a USB to serial cable such as this one from Amazon: StarTech USB to Serial Adapter – Null Modem – FTDI USB UART Chip. Make sure you order the ‘Null Modem’.

1. Install the USB-Serial cable drivers using the CD provided or you can download the latest from the StarTech website here.

2. Plug the USB-Serial cable into your computer and Sophos XG device.

3. Open ‘Terminal’ on your computer and use this command to change to find the USB-Serial:

ls /dev/cu.usbserial-*

This will display your USB-Serial cable which should look something like: “cu.usbserial-XXXXX”, with the X’s being a variation of numbers and letters.

5. Now use the following command to connect to your Sophos XG device (replace XXXXX with your actual USB-Serial cable name):

screen /dev/cu.usbserial-XXXXX 38400 -L

If you get an error message in the terminal that states, “….Resource busy” immediately followed by “Sorry, could not find PTY”, something else on your computer is utilizing the serial connection. I tried restarting my computer but that didn’t seem to help as I received the same message. The one thing I found that did work was unplugging the USB-Serial cable and plugging it back in. Once the USB-Serial cable shows up again in your ‘dev’ directory, immediately try connecting using the ‘screen’ command above. It took a few attempts but I was finally able to get connected. If your USB-Serial device is no longer showing up in the ‘dev’ directory, try restarting the Sophos XG device by pressing the power button on front, waiting a few minutes and pushing the button again (this assumes you have the power button on your Sophos XG device set to power off).

Once it’s connected, you may see a blank terminal screen. Restart the Sophos XG device using the steps in the paragraph above. You should now start to see text being displayed from the device and after the restart, you should now be able to login and access the Sophos XG console.

One thought on “Sophos XG: Setting up a serial connection

  1. Your idea gave me an idea. i am using an old PC with a pcie Intel dual port network card running Sophos XG v18. The motherboard of this old PC has an integrated NIC that i am not using for routing but that i have configured with a static ip address for the purpose of troubleshooting in case i break my Sophos LAN or WAN configuration. Thank you!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s