Re: [chrony-users] help with bindacqaddress

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Tue, May 26, 2020 at 09:42:03AM +0200, Miroslav Lichvar wrote:
> On Mon, May 25, 2020 at 11:24:41AM -0400, Giacomo Comes wrote:
> > with chrony the equivalent command should be:
> >   bindacqaddress <ip>
> > and while this works with a network interface with static
> > ip address, it is troublesome with DHCP.
> > ( I need to change chrony.conf and and restart chronyd every
> > time the ip address changes).
> > Am I missing something?
> 
> No, there is currently no way to specify the interface for NTP
> requests.
> 
> > Could bindacqaddress be changed to
> > have as argument also the network interface name instead of 
> > the ip address?
> 
> It could, at least in theory. The trouble is with portability. I'm not
> sure how to bind a socket to a specific interface on non-Linux
> systems. There is a possibility of getting addresses of all
> interfaces, but I suspect that would be too expensive to do with each
> request. ntpd is continuously tracking all interfaces. That's complex,
> requires a lot of OS-specific code, and not really acceptable for
> chrony.
> 
> As a workaround, maybe you could use policy routing (ip rule) to 
> select the interface for NTP packets?

It could be done with policy routing or iptables (or using a cronjob script). 
I was asking because having the possibility to use:
  bindacqaddress eth0
whould have been easier.

Giacomo

-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/