0

From what I understand from the rsync docs, I should be able to use a hostname with hosts allow. However, it does not work.

This works:

pid file = /var/run/rsyncd.pid
syslog facility = rsync.log
hosts allow = 123.123.123.123

This does not work:

pid file = /var/run/rsyncd.pid
syslog facility = rsync.log
hosts allow = myaddress.dynalias.org

@ERROR: access denied to devf from unknown (123.123.123.123)

If I add the host to /etc/hosts it does work! However, I'm trying to avoid changing it every time my IP address changes by using my dynamic dns hostname.

Is there something I need to do to tell rsync to do a dns lookup rather than just reference the hosts file?

shgnInc
  • 1,634
  • 3
  • 21
  • 29
Tim Duncklee
  • 194
  • 1
  • 12

1 Answers1

1

You need to have your 'reverse DNS' correctly set up for your host.

Obviously, setting reverse DNS for a dynamic IP is complex. Thus I would recommend to adopt a different rsync security strategy (e.g. based on SSH key)

sfk
  • 634
  • 4
  • 11
  • Well that stinks. SSH is IP restricted also but I have a cron that updates iptables based on my dynamic dns entry. Guess I can do the same kind of thing with rsyncd.conf. – Tim Duncklee Oct 12 '14 at 18:26
  • 1
    If you have a cron script, you may also update your `/etc/hosts` to use a FQHN in `rsyncd.conf` – sfk Oct 14 '14 at 09:03