Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to keep your clock on track.
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
lucid007
n00b
n00b


Joined: 03 Jul 2004
Posts: 1
Location: Bucharest, Romania

PostPosted: Sat Jul 03, 2004 4:55 pm    Post subject: Reply with quote

naelr wrote:
Has anyone had a problem using their router with shorewall and trying to use it for an NTP server... I can't get my local machines to get the time from it... I think I might be missing something in the shorewall configuration... when I try to rdate 192.168.0.1 I get connection refused... can anyone start me in the right direction?

Naelr

I have (Shorewall 2.0.3a), in /etc/shorewall:
action.AllowNTP:
Code:
ACCEPT - - udp 123

actions:
Code:
AllowNTP

rules:
Code:
AllowNTP  fw  net
AllowNTP  loc  fw


And in /etc/conf.ntp:
Code:
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap


But this does not permit to get time with rdate, because rdate attempt to connect on time port (37); I configured my lan machines with ntp-client:
/etc/conf.d/ntp-client:
Code:
NTPCLIENT_OPTS="-b 192.168.0.1"

Best regards,
lucid007
Back to top
View user's profile Send private message
dj_farid
l33t
l33t


Joined: 14 Jun 2004
Posts: 613

PostPosted: Sat Jul 03, 2004 5:50 pm    Post subject: Reply with quote

Quote:

dj_farid wrote:
I have the same script as Joseph_sys. When I set the date, it sets it two hours behind.
My rc-conf is set lo local time.
I didn't have the /etc/localtime link before, but I made it now.
#ln -sf /usr/share/zoneinfo/CET /etc/localtime

It still sets the time two hours behind. What could be wrong?

Not sure what could be the problem, as I don't use rdate but rather run a full NTP server on my system.

Remember that you can always check that Linux has the right UTC time by using the command "date -u" to show UTC time instead of local time. Currently UTC is behing CET by two hours as we're on summertime, so apparently rdate is not setting date according to your local time clock setting.

Ciao, Luca


I forgot to mention that date IS showing the time in UTC even though I got it set to local...
Quote:
# date -u
Sat Jul 3 17:47:14 UTC 2004


I have not rebooted after setting the symlink. Do I need to do that? (Really would like to avoid that).
Back to top
View user's profile Send private message
lucaberta
n00b
n00b


Joined: 22 Jun 2004
Posts: 10
Location: Milano, Italy

PostPosted: Sat Jul 03, 2004 6:08 pm    Post subject: Reply with quote

dj_farid wrote:
I forgot to mention that date IS showing the time in UTC even though I got it set to local...
Quote:
# date -u
Sat Jul 3 17:47:14 UTC 2004


I have not rebooted after setting the symlink. Do I need to do that? (Really would like to avoid that).

And what does "date" alone, without the -u flag, give you?

Rebooting should not be needed, as long as "date -u" shows a correct UTC time things should be OK on your system.

Bye, Luca
Back to top
View user's profile Send private message
dj_farid
l33t
l33t


Joined: 14 Jun 2004
Posts: 613

PostPosted: Sat Jul 03, 2004 8:21 pm    Post subject: Reply with quote

The date without the -u flag shows the exact same output with the UTC time.
Back to top
View user's profile Send private message
lucaberta
n00b
n00b


Joined: 22 Jun 2004
Posts: 10
Location: Milano, Italy

PostPosted: Sat Jul 03, 2004 8:27 pm    Post subject: Reply with quote

dj_farid wrote:
The date without the -u flag shows the exact same output with the UTC time.

This is quite strange. Check again that the /etc/localtime link really points to a correct file in /usr/share/zoneinfo but beyond that I wouldn't know what to think.

I have just tried an strace on date and it effectively looks for the /etc/localtime file in real time, so a reboot would not be necessary to activate a timezone.

Sorry I can't be of much help!

Bye, Luca
Back to top
View user's profile Send private message
dj_farid
l33t
l33t


Joined: 14 Jun 2004
Posts: 613

PostPosted: Sat Jul 03, 2004 8:49 pm    Post subject: Reply with quote

Thanks for the help!
Something was wrong with the link. I deleted it and made a new one. I should have tried it earlier...

Anyways, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
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