rsync on multiple ports?

Matthias Schniedermeyer ms at
Fri Jan 25 23:21:52 GMT 2008

On 25.01.2008 16:09, Matt McCutchen wrote:
> On Fri, 2008-01-25 at 12:26 -0800, Robert Denton wrote:
> > I need my rsync to listen on port 8090 as well as on the standard
> > rsync port.  Is this possible, and if so, how does one do this?
> A single background daemon can listen on only one port.  Just start two
> separate daemons with configuration files that are identical except for
> the "port" and "pid file" settings.  A "max connections" limit will
> cover the total of the two daemons provided that both use the same "lock
> file".  Alternatively, if you use xinetd, you can configure two xinetd
> services (one for each port) that both point to the same daemon; this
> way you need only one daemon configuration file.

Or you "misuse" the firewall, or use a port-forwarding program.

The firewall "misuse" goes like this:
iptables -t nat -A OUTPUT -p tcp --dport 8090 -j DNAT --to-destination

The firewall "misuse" obviously needs some kernel support in the form of 
netfilter with connection tracking and NATing. But i guess most 
distribution kernels should contain them.

I personally "misuse" the firewall, in cooperation with some 
SSH-tunnels, to abstract away networking details when i use my 
computer at work in different LANs. That works like a charm. :-)

Bis denn

Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.

More information about the rsync mailing list