Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: GentooForum.de. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

20.04.2011, 23:23

NTP im LAN

Hallo,

ich habe mir einen NTP-Server im LAN eingerichtet und möchte gerne mit jedem meiner Clients im Netzwerk syncen. Habe auch schon einige Tutorials angeschaut die aber bekomme immer wieder die Meldung:

Zitat

* Setting clock via the NTP client 'ntpdate' ...
* Failed to set clock


Der zuständige Port 123 ist freigeschaltet und auf dem Server kann ich über einen externen Server sauber syncen. Wenn ich einen Client im Netzwerk über einen externen Server syncen will klappt das auch. Nur kann ich nicht innerhalb meines Lans syncen...

Ideen?

Client:

Zitat

# /etc/conf.d/ntp-client

# Command to run to set the clock initially
# Most people should just leave this line alone ...
# however, if you know what you're doing, and you
# want to use ntpd to set the clock, change this to 'ntpd'

NTPCLIENT_CMD="ntpdate"


# Options to pass to the above command
# This default setting should work fine but you should
# change the default 'pool.ntp.org' to something closer
# to your machine. See http://www.pool.ntp.org/ or
# try running `netselect -s 3 pool.ntp.org`.

NTPCLIENT_OPTS="-s -b -u \
192.168.0.1"


Server:

Zitat

# NOTES:
#/etc/ntp.conf
# DHCP clients can append or replace NTP configuration files.
# You should consult your DHCP client documentation about its
# default behaviour and how to change it.

# Name of the servers ntpd should sync with
# Please respect the access policy as stated by the responsible person.
#server ntp.example.tld iburst

# Common pool for random people
#server pool.ntp.org

# Pools for Gentoo users
server 0.gentoo.pool.ntp.org
server 1.gentoo.pool.ntp.org
server 2.gentoo.pool.ntp.org
server 3.gentoo.pool.ntp.org

##
# A list of available servers can be found here:
# http://www.pool.ntp.org/
# http://www.pool.ntp.org/#use
# A good way to get servers for your machine is:
# netselect -s 3 pool.ntp.org
##

# you should not need to modify the following paths
driftfile /var/lib/ntp/ntp.drift

#server ntplocal.example.com prefer
#server timeserver.example.org

# Warning: Using default NTP settings will leave your NTP
# server accessible to all hosts on the Internet.

# If you want to deny all machines (including your own)
# from accessing the NTP server, uncomment:
#restrict default ignore


# To deny other machines from changing the
# configuration but allow localhost:
restrict default nomodify nopeer
restrict 127.0.0.1


# To allow machines within your network to synchronize
# their clocks with your server, but ensure they are
# not allowed to configure the server or used as peers
# to synchronize against, uncomment this line.
#
restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap


Habe bereits versucht einfach die letzte Zeile wegzulassen in der ntp.conf um allen zu erlauben zu syncen - kein Unterschied...

Danke schonmal im Voraus!
Chris

PS: Mein Netz ist 192.168.0.XXX. Also sollte passen in der ntp.conf, oder?

2

21.04.2011, 17:10

*push*

Und hier nochmal meine /var/lib/iptables/rules-save:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Generated by iptables-save v1.4.10 on Thu Apr 21 16:57:31 2011
*nat
:PREROUTING ACCEPT [65:6347]
:INPUT ACCEPT [6:375]
:OUTPUT ACCEPT [62:5756]
:POSTROUTING ACCEPT [7:1134]
[79:5974] -A POSTROUTING -o wlan0 -j MASQUERADE
COMMIT
# Completed on Thu Apr 21 16:57:31 2011
# Generated by iptables-save v1.4.10 on Thu Apr 21 16:57:31 2011
*filter
:INPUT ACCEPT [2:240]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [6:812]
[0:0] -A INPUT -i lo -j ACCEPT
[127:17461] -A INPUT -i wlan1 -j ACCEPT
[0:0] -A INPUT ! -i wlan1 -p udp -m udp --dport 67 -j REJECT --reject-with icmp-port-un$
[0:0] -A INPUT ! -i wlan1 -p udp -m udp --dport 53 -j REJECT --reject-with icmp-port-un$
[0:0] -A INPUT ! -i wlan1 -p tcp -m tcp --dport 0:1023 -j DROP
[42:7041] -A INPUT ! -i wlan1 -p udp -m udp --dport 0:1023 -j DROP
[0:0] -A INPUT -p udp -m udp --sport 123 --dport 123 -j ACCEPT
[32:2688] -A FORWARD -d 192.168.0.0/16 -i wlan1 -j DROP
[566:85674] -A FORWARD -s 192.168.0.0/16 -i wlan1 -j ACCEPT
[418:68332] -A FORWARD -d 192.168.0.0/16 -i wlan0 -j ACCEPT
COMMIT
# Completed on Thu Apr 21 16:57:31 2011


Habe ich da was uebersehen?

3

22.04.2011, 07:35

Das http://en.gentoo-wiki.com/wiki/NTP#Be_a_Time_Server hast du studiert.

ntpd ist gestartet und in /var/log/messages ist auch nix blödes dazu zu finden?
http://www.dyle.org
IM-Account (Jabber!) sind auf meiner HP ...
There is no place like /home

http://www.gentooforum.de
http://www.gentoofreunde.org

<div>how to annoy a web developer?</span>

4

22.04.2011, 20:33

Ja, das habe ich gelesen und in den logs fand ich nur das:

Quellcode

1
2
3
4
5
6
7
8
Apr 21 16:48:30 Server ntpd[20737]: ntpd 4.2.6p3@1.2290-o Wed Apr 20 15:11:56 UTC 2011 (1)
Apr 21 16:48:30 Server ntpd[20738]: proto: precision = 0.304 usec
Apr 21 16:48:30 Server ntpd[20738]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Apr 21 16:48:30 Server ntpd[20738]: Listen normally on 1 lo 127.0.0.1 UDP 123
Apr 21 16:48:30 Server ntpd[20738]: Listen normally on 2 wlan0 192.168.2.102 UDP 123
Apr 21 16:48:30 Server ntpd[20738]: Listen normally on 3 wlan1 192.168.0.1 UDP 123
Apr 21 16:48:30 Server ntpd[20738]: peers refreshed
Apr 21 16:56:00 Server ntpdate[23701]: step time server 131.234.137.24 offset 13.594880 sec


ok?

Verwendete Tags

LAN, NTP, SYNC