# NTP does not synchronize time

## fhwi93ne

Hi @ all,

I try to set up an NTP-server to syncronize my homelan time. My NTP-Server cannot connect to the stratum 2 servers. Here is the error message:

```

 7 Feb 10:30:17 ntpd[12588]: running as uid(123)/gid(123) euid(123)/egid(123).

 7 Feb 10:30:18 ntpd[12588]: sendto(195.13.23.5): Operation not permitted

 7 Feb 10:30:22 ntpd[12588]: sendto(134.214.100.6): Operation not permitted

 7 Feb 10:30:24 ntpd[12588]: sendto(161.53.2.70): Operation not permitted

 7 Feb 10:30:26 ntpd[12588]: sendto(195.13.1.153): Operation not permitted

 7 Feb 10:30:27 ntpd[12588]: sendto(80.67.177.2): Operation not permitted

 7 Feb 10:30:30 ntpd[12588]: sendto(80.67.179.2): Operation not permitted

```

My ntp.conf file looks like this:

```

logfile     /var/log/ntpd.log

driftfile   /var/lib/ntp/ntp.drift

restrict default noquery notrust nomodify

restrict 127.0.0.1

fudge 127.127.1.0 stratum 3

server 127.127.1.0

server 195.13.23.5 minpoll 7 maxpoll 13 prefer  # Belgium Belnet 1

server 195.13.1.153 minpoll 7 maxpoll 13     # Belgium Belnet 2

server 80.67.177.2 minpoll 7 maxpoll 13      # Paris/France 1

server 80.67.179.2 minpoll 7 maxpoll 13      # Paris/France 2

server 134.214.100.6 minpoll 7 maxpoll 13    # Lyon/France

server 161.53.2.70 minpoll 7 maxpoll 13      # Zagreb/Croatia

```

Any ideas?

Thanks

Holger

----------

## alsaleha

does it work if you run it as root? I ask because

 *Quote:*   

> 
> 
> 7 Feb 10:30:18 ntpd[12588]: sendto(195.13.23.5): Operation not permitted
> 
> 

 

sounds like a permissions problem, I could however be wrong.

----------

## nahpets

This is my /etc/ntp.conf.  Maybe you can try removing the "minpoll" and "maxpoll" directives.  Also, why are you listing "123.0.0.1" as a server?  That means you're trying to sync yourself to -- yourself? doesn't it?

 *Quote:*   

> 
> 
> restrict default noquery notrust nomodify
> 
> restrict 127.0.0.1
> ...

 

----------

## fhwi93ne

Running it as root does not work either. Same problem.

I dropped the line synchronizing with myself (server 127.127.1.0) and also the minpoll and maxpoll values.

Still the same problem. 

```

7 Feb 11:36:49 ntpd[12888]: sendto(195.13.23.5): Operation not permitted

```

Is the operation not permitted on my local machine or am I not allowed to poll the timeserver?

----------

## nahpets

Could be that you're not allowed to access those machines.  Did you try some other ones?

----------

## DawgG

do you have any firewall-rules on this machine or somewhere on the way?

 could be a firewall problem. if you set the default policy in iptables to

```
 DROP
```

 nothing which no explicitly allowing rule is defined for will get out. if you eg allow www and pop to get out and 

```
DROP
```

 anything else by default ntp will not get thru.

if there's firewall rules in the way you might test 

```
iptables -P OUTPUT  ACCEPT
```

 if firewalling is done on the ntp-machine; if it's done on antother machine replace 

```
OUTPUT
```

 in the above statement with 

```
FORWARD
```

this is quite rudimentary. you might have to adjust some other rules (esp NAT-rules), but you should be able to find out if this is the reason.

BE CAREFUL! RESTORE THE ORIGINAL FIREWALL-RULES ASAP OR YOUR SYSTEM(S) WILL BE INSECURE.

the DawgG

----------

