Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[ntp] still doesn't work

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
volospin
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Tue Aug 06, 2002 3:04 am
Location: Hong Kong

[ntp] still doesn't work

  • Quote

Post by volospin » Tue Feb 22, 2005 9:56 am

I unmerge openntpd and emerge ntp
follow the instruction in http://www.gentoo.org/doc/en/home-router-howto.xml
no matter I use Dimension4 or w32time in Windows2000,
Firewall allow any traffic from the server or port 123 as mention in the document.
I still can get the Windows2000 time to sync with the ntp tux box.

The message I get from Dimension4 is
"The NTP message received is invalid! Will try again in a moment..."

The following are the config files of ntp and ntp-client

/etc/ntp.conf

Code: Select all

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

#server pool.ntp.org

server ntp.cuhk.edu.hk

##
# 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

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

restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
/etc/conf.d/ntpd

Code: Select all

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.15 2004/07/15 00:05:46 agriffis Exp $

# Options to pass to the ntpd process
# Most people should leave this line alone ...
# however, if you know what you're doing, feel free to tweak
NTPD_OPTS="-u ntp:ntp"
/etc/conf.d/ntp-client

Code: Select all

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.confd,v 1.10 2005/01/28 22:37:09 vapier Exp $

# 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="-Q -b -u pool.ntp.org"

NTPCLIENT_OPTS="-Q -b -u ntp.cuhk.edu.hk"

# How long to wait (in seconds) before giving up.
# Useful for when you boot and DNS/internet isn't
# really available but you have your net interface
# come up with say a static IP.
NTPCLIENT_TIMEOUT=30
Any hints are welcome, by the way, I didn't have iptable emerged or running.
PIII-S 1.4G / 512MB / TUSL2-M / 3C920 x 2 / Seagate Barracuda IV 40GB
Top
j-m
Retired Dev
Retired Dev
Posts: 975
Joined: Sun Oct 31, 2004 3:54 pm

  • Quote

Post by j-m » Tue Feb 22, 2005 10:15 am

Either don´t use restrict or set it properly...
Top
transient
l33t
l33t
Posts: 759
Joined: Thu Jan 13, 2005 5:30 am

  • Quote

Post by transient » Tue Feb 22, 2005 1:40 pm

Are you actually on the 192.168.0/24 network?
If not, theres your first problem. Replace the 192.168.0.0 with whatever broadcast IP youre using. This is generally x.x.x.0 or x.x.x.255
On my network, we are on 192.168.10/24, so Id set

Code: Select all

restrict 192.168.10.0 mask 255.255.255.0 nomodify nopeer notrap
Also, you dont really want that first restrict line....
Change

Code: Select all

restrict default ignore
to

Code: Select all

#restrict default ignore
Top
volospin
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Tue Aug 06, 2002 3:04 am
Location: Hong Kong

  • Quote

Post by volospin » Wed Feb 23, 2005 8:43 am

with 192.168.0.255 now it works...
also commends the restrict default ignore
PIII-S 1.4G / 512MB / TUSL2-M / 3C920 x 2 / Seagate Barracuda IV 40GB
Top
volospin
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Tue Aug 06, 2002 3:04 am
Location: Hong Kong

  • Quote

Post by volospin » Thu Feb 24, 2005 1:26 am

anything related to I am using 2.6.10r6 kernel?
PIII-S 1.4G / 512MB / TUSL2-M / 3C920 x 2 / Seagate Barracuda IV 40GB
Top
transient
l33t
l33t
Posts: 759
Joined: Thu Jan 13, 2005 5:30 am

  • Quote

Post by transient » Thu Feb 24, 2005 1:37 am

Nope.
All thats required for ntp support is that you emerge ntpd or openntp, and setup the required files.
/etc/ntpd.conf, /etc/conf.d/ntp-client and /etc/conf.d/ntpd for ntpd, not sure about openntp.
Top
volospin
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Tue Aug 06, 2002 3:04 am
Location: Hong Kong

  • Quote

Post by volospin » Thu Feb 24, 2005 7:42 am

It works sometimes...
when I change the line of 192.168.0.255 to 192.168.0.0 and restart ntpd
it won't work... then when I change back to 192.168.0.255 and restart... it still doesn't work...
even I restart my tux box... nothing works :(

--------------

actually, it does work... but not immeidate...
I mean... after awhile and try to sync the clock... it does sync immediate
(test by adjust the clock to 10 minutes in the future)

I will try the setting of 192.168.0.0 this time...
PIII-S 1.4G / 512MB / TUSL2-M / 3C920 x 2 / Seagate Barracuda IV 40GB
Top
j-m
Retired Dev
Retired Dev
Posts: 975
Joined: Sun Oct 31, 2004 3:54 pm

  • Quote

Post by j-m » Thu Feb 24, 2005 8:52 am

Code: Select all

/etc/init.d/ntpd zap
/etc/init.d/ntpd start
And also some error messages would be really handy when troubleshooting. :roll:
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic