On Tue, Jun 06, 2017 at 10:59:30AM +0100, Ron Leach wrote: > On 05/06/2017 14:08, Henning wrote: > > > >socat > > > > Henning, thank you for that. socat seems a very flexible package. > > Have you used it yourself, at all? I couldn't see from the documentation
Yes I connect a serial port over network. > how to terminate socat. I was planning to use a variation of one of their > examples, like this: terminate in terms of "stopping"? I think SIGHUP will work. > > socat -d -d -lmlocal2 \ > TCP4-LISTEN:3129,su=nobody,fork,range=192.168.0.0/24,reuseaddr \ > TCP4:name.server.tld:4444 > > I was also unsure whether socat would hold open a connection to > name.server.tld even if no transactions were taking place, or whether socat > would only open the connection each time traffic arrived on 3129 and it > forked another child process. The documentation seems to imply that the > 'open' takes place before traffic and before forking, which suggests to me > that the connection is opened and remains open. I'd prefer an arrangement > where a connection was made each time a transaction sequence was initiated > by traffic on the local, incoming, 3129 port (in my example), and then > closed when traffic stopped. I'll reread the documentation, anyway. > Well,wel, aren't we a bit high maintenance? However I like how you ask questions intelligently. IMO it's half the way to come to a solution. A rare sight these days. With the fact that socat is pretty much the universal patch cable, you are expecting too much here. It seems you are looking for a protocol aware proxy. If you let us know what protocol ... -H -- Henning Follmann | hfollm...@itcfollmann.com