1

I'm trying to figure out how to provide a proxy server for Modbus/TCP traffic. This is non-http traffic (industrial protocol), and usually connects to port 502.

The purpose is to give remote devices a static IP address which they can connect to (i.e. a cheap cloud server) while supporting dynamic IP addresses at the destination (i.e. standard DSL/cable internet).

Can SQUID (or other linux-based proxy) be configured to

  1. Listen on port 502 for incoming connections

  2. Transparently pass the connection on to an IP address which is specified in the configuration file

  3. Support dynamic destination IP addresses, possibly linked to a dynamic DNS update client or hostname?

Suggestions for accomplishing this are greatly appreciated.

Ryan Griggs
  • 885
  • 2
  • 12
  • 27
  • 1
    Typically people do something different, they set up [dynamic DNS](https://en.wikipedia.org/wiki/Dynamic_DNS) so they'll have a persistent hostname for a dynamic IP-address and configure their clients directly with that hostname. - But HAproxy can be configured with a dynamic DNS hostname in it's configuration and will change the destination IP-address when the DNS gets updated. See https://serverfault.com/a/910273/37681 – HBruijn May 23 '18 at 14:52
  • @HBruijn Thanks for your input. I wish we could use dynamic DNS directly, but the remote devices *only* support IP addresses - sadly, hostnames can't be used. I will look into HAproxy - thanks for the suggestion! – Ryan Griggs May 23 '18 at 14:54
  • @HBruijn I just tested haproxy (thanks https://www.linickx.com/load-balance-anything-with-haproxy) and it works perfectly for this application. The Modbus requests on port 502 are directly forwarded to the destination. Thanks for pointing me to HAProxy! – Ryan Griggs May 23 '18 at 17:02

0 Answers0