Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65502 - generated ntp.conf has strange restrict lines.
Summary: generated ntp.conf has strange restrict lines.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
: 64171 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-27 01:51 UTC by Erik Thiele
Modified: 2005-10-05 02:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Thiele 2004-09-27 01:51:29 UTC
ntpd security looks for the matching "restrict" line. when it finds it, it uses its security settings and ignores all the other lines, especially the "restrict default" line! only if no match is found, "restrict default" is used.

i suggest generation of restrict lines as follows:

1) restrict default nomodify nopeer
2) restrict 127.0.0.1

the outcome of these two lines is:

the localhost may configure the local ntp daemon. all other hosts may query it, but they may not change anything.
nopeer is important, otherwise other hosts can change our time by playing bad peers.

there is no need for any more other "restrict" lines.
i dont think that the generated network based line is secure:

restrict 192.168.0.0 mask 255.255.255.0

this means that all hosts in our LAN can modify the local hosts clock...
imagine a public LAN, where notebooks can be attached and it's possible to change time on other hosts.

the "notrust" option is wrong in all cases. "notrust" implies copying a secret file from the server to the clients and injecting it with the ntpq console. i am sure that's not what a dhcp autoconfigured host wants to do.

the restrict line for the server itself is also not neccessary. my host is syncing to the server even though in theory the server is not allowed to do this.

Reproducible: Always
Steps to Reproduce:
start dhcpcd, and it generates a new ntp.conf


Expected Results:  
restrict default nomodify nopeer
restrict 127.0.0.1
no other restrict lines.
Comment 1 Toralf Förster gentoo-dev 2004-10-28 00:42:08 UTC
yes, with the generated ntp.conf no synchronization was possible
Comment 2 SpanKY gentoo-dev 2004-11-09 07:30:23 UTC
*** Bug 64171 has been marked as a duplicate of this bug. ***
Comment 3 Roy Marples (RETIRED) gentoo-dev 2005-10-05 02:31:55 UTC
This bug is over a year old and seems to imply that dhcpcd is generating faulty
/etc/ntpd.conf files.

This should be fixed with dhcpcd-2.0.0 - re-open if anyone disagrees.