Can I use Port Forwarding feature in the GSM routers to enable Modbus TCP servers (which connected to GSM router thru Ethernet cables) send to / receive data from Modbus TCP client which is connected to another GSM router thru Ethernet cable?

I know that Modbus TCP server(s) and Clients would be connected to each other if both are on the same IP network, we can use Ping command to check the connectivity.

In my case the Modbus TCP server(s) are ethernet wired connected to GSM router and Modbus TCP client(s) are ethernet wired connected to another GSM router, both router are using the same GSM 4G network. both router has a one static IP address.

Is Modbus TCP support port forwarding feature which is existing in GSM routers?

Modbus TCP won't care - as long as the server (slave) has a fixed IP, then forwarding TCP port 502 is all you need.

However, some carriers do not allow mobile-to-mobile within their own networks UNLESS you prearrange this. Since port 502 is a well-known value and Modbus has no security, you do risk some kid finding your server and changing your register values. Also, opening the TCP socket over cellular likely takes up to 5 seconds (due to how cell towers allocate resource to previously idle devices), and some Modbus TCP client tools will timeout the CONNECT in 1 second (or I saw one timeout in 0.1 sec!) So your client will never connect unless you can slow down the timeout. While connected, you'll also need to move traffic at least every 5 minutes, or the socket aborts in mysterious ways. So either connect & poll at least every few minutes - or connect, poll, then close gracefully.

Yes, also consider asking your cellular carrier for a "Private APN", which means you'll need to VPN into the carrier from a PC, but then they can assign you a 'cheap' fixed IP like 172.x.x.x (maybe at no extra cost). Often you need to pay a fixed one-time setup fee (like us$500 per accout) to set this up, but then likely you DO NOT need to pay the extra $$ per month for a fixed public IP. Make sure they allow "spoke to spoke" communications, so your Modbus 'master' at site A can link to your Modbus 'slave' at site B.

Besides protecting your Modbus/TCP, this also can cut potentially HUGE bills should someone decide your fixed PUBLIC IP address looks "interesting". You pay for all access, so even if someone tries a dictionary attack on your device's web server ... YOU PAY! I've had customers hit with over us$2000/month surprise bills because of this. Last time I looked at the rejected traffic on an AT&T 166.x.x.x fixed IP, it was seeing about 40 probes a day for things like SQL, FTP, RDP, HTTP, and so on. None likely do any harm - except that YOU will be billed for about 1/2K of traffic per probe. The Private APN prevents this, and to be honest the carriers LIKE you to use the private APN because it costs them less headache (they know darn-well you'll complain & try to get out of paying a $2000 bill when you expect a $9 bill!)

Users of this site are benefiting from open source technologies,
including Linux,
PHP,
MySQL and
Apache. Be happy.
This page served by Yesod4 in the beautiful
Blackstone Valley of Massachusetts, the home of the American Industrial
Revolution.

Fortune"You must have an IQ of at least half a million." -- Popeye

You have clicked on the "?" button for search help. To search the
site, enter your search terms in the box labeled "search the site"
and hit Enter.

Some tips for better search results...

Precede each search term with a "+", as follows:

+Modbus +TCP

Otherwise, any post with either term will match.

Use double quotes around phrases, as follows:

+"Allen Bradley" +ethernet

Otherwise, posts containing these words in separate locations will match.

To exclude a word, precede it with a "-", as follows:

+Modbus -Plus

This will return only posts containing "Modbus" but NOT containing
"Plus".

Note that common words (and, that, etc.) and words shorter than 2 characters
are automatically excluded from searches.

Your subscription request is being
processed.

You must be a Control.com member
to subscribe to threads. Please log in and try again.

If you're not already a member, consider joining. It's free,
and you can customize the content you view, as well as being
able to subscribe to threads and topics, getting new posts
delivered to your email as they appear.

Username

Password

Remember me on this computer

Select the categories for which you would like to
see messages displayed...

Applications

Application Questions and Problems

Automation Business

The Business of Automation and Control

Communications

Communications systems and equipment.

Engineering

Engineering and workplace issues.

HMI

Human-Machine Interface and SCADA.

Information

Information resources, documentation.

Languages

Programming languages.

Motion Control

Motion control, servos, steppers, etc.

Networking

Local and wide area networking in factory automation.

Open Control

Open interfaces, software and hardware

PCs in Automation

Computers in manufacturing; also hardware discussion.

PLCs

PLCs and related questions.

Power Generation

Power generation equipment control.

Process Control

Continuous process industries, DCS questions.

Sensors

Sensor technologies.

Software in Automation

Software, including programming, OS issues, etc.

You must be a Control.com member
to vote on a post. Please log in and try again.

If you're not already a member, consider joining. It's free,
and you can customize the content you view, as well as being
able to subscribe to threads and topics, getting new posts
delivered to your email as they appear.