Nat – Possible for Socket communication between 2 internet-connected GSM modems

3ggsmnat;networkingwifi

I have 2 internet-connected 4G modems connected to 2 separate computers and I'd like to send/receive data between them with sockets (UDP) using the modems' packet-switched 4G Internet connection, not using AT commands to dial each other.

The problem is that I can't get either modem to receive incoming UDP traffic from the other. The provider is NAT'ing both devices and I can't do any port forwarding within the GSM provider's router. It looks like the GSM provider blocks incoming connections to both devices, so how can I do socket communication? I've thought about setting up a FTP/web/email server to relay traffic between the two devices, but I'd rather do it with socket (TCP or UDP). Any ideas?

Best Answer

I will assume that each of the modems have a private IP address and they're NAT through the internet by your provider using a public IP address.

Usually providers block private IP communications with each other (this is called Intra APN communication) the reason is quite obvious: Security. If the subscribers are in the same private network, they likely might be able to access each others IP/ports including Windows shared folders that might not be password protected. Have you tried to ping from one IP to another?

Having said this, your provider should protect you from that scenario that I've just specified.

There are a few workarounds but none are optimal:

1) Buy a private APN from your telco provider. This will allow your SIM cards to communicate freely with each other but not to the world. This is usually a corporate service and for individuals might be a little costly.

2) Connect to an external public IP (VPN/Proxy) responsible to switch the data between the two GSM nodes.

I'm not sure if this is exactly your case but I work for a telco provider and I managed the Packet Switching (PS) Core team for more than 2 years and we dealt a few times with scenarios like those.

I hope this helps.

Related Topic