Remotely logging in to Raspbery pi connected to Sixfab 3G/4G& LTE Base HAT

I have raspberry pi 3 connected with Sixfab 3G/4G& LTE Base HAT. The SIM card I am using has a dedicated IP address assigned to it.
I could remotely ssh raspberry pi when connecting with 4G Huawei USB modem by configuring port forwarding under virtual server setting in 4G huawei USB modem. This way I could remotely ssh Raspberry pi from anywhere.
But with this Sixfab 3G/4G& LTE Base HAT how can we do the similar configuration so that I can remotely ssh raspberypi using the dedicated Ip address that has been assigned to that SIM
Thank you

Hi Suman,

You must have a public IP address. The public IP you found probably isn’t the real public IP and you are behind carrier grade NAT (CG-NAT). Unless your mobile provider supports port forwarding or gives you a private IP-address (which is unlikely), you can’t just SSH in. Perhaps a reverse SSH-tunnel using auto-ssh or add-on software can help you.

Hi ensar,
Thank you for your reply.
The static IP has been provided by carrier Telstra itself for this SIM card. It is under VPN network. This has been working fine when connected to other modem which can be configured port forwarding under virtual server.

With same SIM card, when inserted in Huawei E8372h USB modem and connected to the same Raspberry pi, I can remotely log in via SSH. This modem is configured to forward port 22 under virtual server setting.

But I am not sure how to forward port 22 when connected with 3G/4G& LTE Base HAT. Raspberry pi has the static private ip address provided by 3G/4G& LTE Base HAT which is usb0: So if I have to configure 3G/4G& LTE Base HAT to forward port 22 to static address , i don’t know how to do this.


If you are using the Quectel EC25 module, please check out the following links.

EC21&EC25&EC20 Socket Forwarding AT Commands Manual
EC2x&EG9x&EM05 TCP/IP AT Commands Manual
EC25&EC21 AT Commands Manual - Section 10: Packet Domain Commands

Thank you for your prompt reply.
I am using Quectel EG25-G model. Is it the same for this module as well?
Also as I am new to this AT commands, I am overwhelmed by the contents of the documents, and not sure which one to try.
So I was wondering if you could show me AT commands for that. All I want to do is forward port 22 for the private static ip address

The attached picture is what I had to do for huawei USB modem so that I could ssh to raspberry pi.

. The only difference In this case is private static IP address assigned to raspberry pi is

Is there AT commands to setup that port forwarding similar to the attached picture.



Hi ensar,
I setup the TCP/UDP server on AP side by:

It then responded as Ok.
Also established the client side as well.

When i tried to SSH, it then shows following on minicom

The putty gets stuck on black screen.It seems like connection is successful but putty not responding back.

Is there any other AT config that i need to push or write?


Hi Ensar,

I am also got stuck on this issue of port forwarding. Did you get some success in this? I am using 3G/4G and LTE Base HAT with EC25-E.

Abdul Rehman

Hi Abdul,
Not yet, I am waiting for Ensar response. Its been a while since he has responded,may be he has been busy. Hoping he would respond back soon.

I am stuck as well.

-QFWDURC:"client/incoming ",22,3,…

This is what it says when Putty is trying to connect through SSH.

Hi Suman,
To access your pi remotely you can use VNC application. To configure that, you need to create an account on VNC.
For the first time configuration, you will need to connect with pi in a local environment and then sign in to VNC from pi and make it a VNC client.
I am able connect with Raspberry pi remotely using VNC, but I still need port forwarding for creating PiVPN.

Hi Abdul,
I have a setup for connection to multiple pi , with respective usb connected huawei dongle(E8372h ). The SIM card used in huawei has private ip address which means by just port forwarding in the huawei configuration, I could easily remotely connect to these pi. But I am trying to replace these huawei dongles with Sixfab 3g/4g lte , and not able to forward port properly.
Using VNC client is not feasible in my case.