Socat like proxy

Hello,

Is there a way to get a socat like behavior on ROS? I have several devices behind Mikrotiks that have a different default route and without possibility to add routes on them. The only way I can connect to them from Mikrotik side is via an IP in the same IP range. Having a Linux there is not an option at this point.

Thank you!

I had a similar problem the other day, looking for socat-like behaviour. I had a server on a LAN that only binds to the local subnet but had a client application that needs to connect in from the WAN - essentially the packets had to look like they were coming from the router’s LAN address, not a WAN address which requires the reply sources and destination address to be rewritten.

The solution I tried that works is to have a dstnat rule (to rewrite the destination address to the internal server) followed by a srcnat/masq rule (which changes the source address the server sees).