You are not logged in.

#1 2011-08-11 20:43:48

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

[solved] ntp and firewall

hi to everybody,

does ntp require particular iptables rule to work ?

thanks

Last edited by nTia89 (2011-08-12 12:07:26)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#2 2011-08-11 21:34:03

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 716

Re: [solved] ntp and firewall

Do you mean the server or the service?

Offline

#3 2011-08-11 21:41:35

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [solved] ntp and firewall

You don't need any special port opened to just use ntpd to set your clock correctly. The "--state RELATED,ESTABLISHED" rule is enough to allow replies back to you from timeservers.

Offline

#4 2011-08-11 23:06:47

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: [solved] ntp and firewall

nTia89 wrote:

does ntp require particular iptables rule to work ?

NTP uses UDP port 123, so that will need to have an open path in both directions between the client and server(s). This can be done either explicitly with --dport and --sport or using connection tracking as ataraxia has pointed out.

Offline

#5 2011-08-12 09:28:43

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [solved] ntp and firewall

so, i need, for example:

iptables -A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT

before start npd ?
and every time i launch it, because iptables reset every reboot, is right ?

Last edited by nTia89 (2011-08-12 09:29:54)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#6 2011-08-12 10:56:02

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: [solved] ntp and firewall

nTia89 wrote:

and every time i launch it, because iptables reset every reboot, is right ?

Not if you save the rules after you set them wink

/etc/rc.d/iptables save

Offline

#7 2011-08-12 12:07:11

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [solved] ntp and firewall

ok

solved


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

Board footer

Powered by FluxBB