Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/ntp.conf need both manual data as dhcp data. How ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 453

PostPosted: Fri Sep 20, 2013 11:34 am    Post subject: /etc/ntp.conf need both manual data as dhcp data. How ? Reply with quote

I have ntpd running with the following in /etc/conf.d
Quote:
# Generated by udhcpc for interface ethm
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 195.13.1.153 nomodify notrap noquery
server 195.13.1.153driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log


It is good that udhcp writes this, as the upstream server may change.

On the other hand, as I wish this ntpd instance to also be a server for my subnet, I would need an additional line
Quote:
restrict 192.168.4.0 mask 255.255.255.0 notrust nomodify notrap


If I add that line manually to /etc/ntp.conf, it gets overwritten whenever I get a new ip from upstream.
I guess, I would need to provide that line in some other file, but could not find where I should specify this.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Sep 23, 2013 9:38 am    Post subject: Reply with quote

You could use dhcpcd instead of udhcpc as dhcpcd's NTP hook script just adds to the existing configuration instead of whole heartedly changing it.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum