This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NTP not working??

I'm having a problem getting NTP packets to pass through my firewall.  My NTP client (MRTech ClockAlign) has three options for protocol to use. . .SNMP, which works fine, and standard NTP via UDP or TCP, neither of which does.  The downer on this is that SNMP NTP requests have the least info of all types, I'm told.

I have defined NTP on my definitions as dest. port 37 UDP/TCP, send.port 1024:65535.  I have then created a rule in the packet filters that says "Any" NTP from "Any" allow.

Nevertheless, when I try to sync my clock using MRTech on TCP or UDP the packet filter shows the following:

11:51:30 192.168.0.33 2008  ->  192.5.41.40 37 TCP SYN  
11:51:30 192.168.0.33 2009  ->  192.5.41.40 37 TCP SYN  
11:51:34 192.168.0.33 2009  ->  192.5.41.40 37 TCP SYN  
11:51:34 192.168.0.33 2010  ->  192.5.41.40 37 TCP SYN  

and with UDP:

11:54:02 192.168.0.33 2074  ->  192.5.41.40 37 UDP  
11:54:06 192.168.0.33 2076  ->  192.5.41.40 37 UDP  
11:54:10 192.168.0.33 2079  ->  192.5.41.40 37 UDP  
11:54:14 192.168.0.33 2081  ->  192.5.41.40 37 UDP  
11:54:18 192.168.0.33 2083  ->  192.5.41.40 37 UDP 

Switch it to SNMP and it's fat & happy.

Any clues?

Thanks

Dan  


This thread was automatically locked due to age.
Parents
  • Dan,

    I assume 192.169.0.33 is your NTP client and 192.5.41.40 is the destination server. If this is correct, please post the following chains (from the filterlivelog page in webadmin):

    USR_FORWARD
    NAT_PRE

    /marcel
    NAT_POST 
  • Marcel,

    Here ya go:

    Chain USR_FORWARD (1 references)
     pkts bytes target     prot opt in     out     source               destination         
    13306  647K ACCEPT     all  --  *      *       192.168.0.0/24       192.168.1.0/24     
       51  4652 ACCEPT     all  --  *      *       192.168.1.0/24       192.168.0.0/24     
        0     0 ACCEPT     all  --  *      *       10.214.186.0/24      0.0.0.0/0          
        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0          tcp spts:1:65535 dpt:53 
      319 20889 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0          udp spts:1:65535 dpt:53 
     1308 63304 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:80 
       94  4496 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:443 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp dpt:22 
        4   188 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:23 
        2    88 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpts:20:21 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:21 
       97  4764 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:110 
        6   288 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:25 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:43 
        8   352 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpts:2847:2848 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spt:137 dpt:137 
        0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0          udp spt:137 dpt:137 
        0     0 ACCEPT     all  --  *      *       192.168.0.0/24       10.46.81.0/24      
        0     0 ACCEPT     all  --  *      *       10.46.81.0/24        192.168.0.0/24     
        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.0.0/24     udp spts:6970:7170 dpts:1024:65535 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:554 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:7070 
      664 50464 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0          udp spt:123 dpt:123 
        4   304 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0          udp spts:1024:65535 dpt:123 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:1755 
        0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0          udp spts:1024:65535 dpt:1755 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:7001 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:8600 
        0     0 ACCEPT     all  --  *      *       192.168.100.0/24     192.168.0.0/24     
        0     0 ACCEPT     all  --  *      *       192.168.0.0/24       192.168.100.0/24   
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:5000 
        0     0 ACCEPT     all  --  *      *       192.168.0.0/24       192.168.0.0/24     

    Chain NAT_POST (1 references)
     pkts bytes target     prot opt in     out     source               destination         
    57202 3818K MASQUERADE  all  --  *      eth1    192.168.0.0/24       0.0.0.0/0          

    Chain NAT_PRE (1 references)
     pkts bytes target     prot opt in     out     source               destination         



    Dan  
Reply
  • Marcel,

    Here ya go:

    Chain USR_FORWARD (1 references)
     pkts bytes target     prot opt in     out     source               destination         
    13306  647K ACCEPT     all  --  *      *       192.168.0.0/24       192.168.1.0/24     
       51  4652 ACCEPT     all  --  *      *       192.168.1.0/24       192.168.0.0/24     
        0     0 ACCEPT     all  --  *      *       10.214.186.0/24      0.0.0.0/0          
        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0          tcp spts:1:65535 dpt:53 
      319 20889 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0          udp spts:1:65535 dpt:53 
     1308 63304 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:80 
       94  4496 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:443 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp dpt:22 
        4   188 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:23 
        2    88 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpts:20:21 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:21 
       97  4764 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:110 
        6   288 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:25 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:43 
        8   352 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpts:2847:2848 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spt:137 dpt:137 
        0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0          udp spt:137 dpt:137 
        0     0 ACCEPT     all  --  *      *       192.168.0.0/24       10.46.81.0/24      
        0     0 ACCEPT     all  --  *      *       10.46.81.0/24        192.168.0.0/24     
        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.0.0/24     udp spts:6970:7170 dpts:1024:65535 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:554 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:7070 
      664 50464 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0          udp spt:123 dpt:123 
        4   304 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0          udp spts:1024:65535 dpt:123 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:1755 
        0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0          udp spts:1024:65535 dpt:1755 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:7001 
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:8600 
        0     0 ACCEPT     all  --  *      *       192.168.100.0/24     192.168.0.0/24     
        0     0 ACCEPT     all  --  *      *       192.168.0.0/24       192.168.100.0/24   
        0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0          tcp spts:1024:65535 dpt:5000 
        0     0 ACCEPT     all  --  *      *       192.168.0.0/24       192.168.0.0/24     

    Chain NAT_POST (1 references)
     pkts bytes target     prot opt in     out     source               destination         
    57202 3818K MASQUERADE  all  --  *      eth1    192.168.0.0/24       0.0.0.0/0          

    Chain NAT_PRE (1 references)
     pkts bytes target     prot opt in     out     source               destination         



    Dan  
Children
  • I should add that looking thru those rules I don't even see a rule with dpt:37 despite the fact that I just double-checked my definitions, and NTP is defined as 37 tcp/udp, and I have a rule   NTP allow, and it's "green-lighted."

    Dan  
  • uhm.. agreed.. (and strange, too) .. can you please send a backupfile of your config to support@astaro.com attn. marcel (refer to ubb)

    thx
    /marcel 
  • Just for those who might be wondering, I sent the file to Marcel as requested the same day. . .no response yet.

    Dan  
  • Dan,

    even Astaro employees need some holiday  [;)]

    Let's focus on udp/123, therefore you have rule which apparently matches
    664 50464 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spt:123 dpt:123 

    So I assume that you have to check the client settings. The ntp server 192.5.41.40
    is up and running.

    In my opinion your rule should be more specific, so that only ineternal hosts can
    connect to ntp services.

    read you
    o|iver
      
  • No objection for the holiday, Oliver.  I just wanted to keep the thread awake!

    My ntp client (MRTech ClockAlign 1.0) seems only to use port 37, not 123, as evidenced by the packet drop logs, which is why I had been concentrating on that port.

    The reason I had the rule as Any-Any is that the local NTP server I use on my WinNT4 machine (David Mills' NTP server v4) didn't work until I opened the port both ways.  I'm not saying this *should* be true  [:$]t was!

    Cheers,

    Dan  
  • *If* it is using udp/123, there are two types of NTP in my experience. One uses a high port (client end) ->port 123 on the server, the other uses 123->123 (ie: the connectino is from 123 to 123.

    From what you say, it would appear that your client is using 37 though, which, as pointed out above, is "time", not NTP. I have to admit not knowing the detailed differences. My NTP client Automachron --  http://oneguycoding.com  uses high port -> 123, and appears to work fine.

    Cheers,

    Karl

    PS: I have no interest in the NTP client, I just found it on the 'net, and it works, so I use it. 
  • Lest the discussion get too far afield, however, the real issue is not NTP itself.  It is:  "Why on earth do I get packet drops showing in the log for a port which, according to WebAdmin, is open on my system?"  The fact that the port in question is NTP is only window-dressing; the *real* issue is the discrepancy between settings and function.

    Dan  
  • If computer "a" is trying to use service "x" on server "b", which is located on the internet, and there is a rule which should allow it, and you still get drops in the logs, I would ask "does the service work for computer 'a'?" I would guess not, in which case the rule may well be wrong in some way, and hence the drops. If, of course, the service does work, then there is something wierd going on.

    So.... can your network client sync ntp with the server? If not, the rule that should allow it, is wrong in some way......

    My NTP rule looks like :

    { net_private }   NTP-Async   Any   Allow

    Where NTP-Async is a built in service, defined as :

    NTP-Async   udp   1024:65535   123

    Cheers,

    Karl

     
  • That gets back to the issue that is why I sent Marcel my config file.  As the thread above shows, there is no port 37 rule in IPChains, despite the fact that there's a rule that shows big as life in the WebAdmin menu of ASL.  This disconnect between the behind-the-scenes configuration and what shows on the menu is the whole reason I started this thread.

    As far as whether or not computer "a" (in this case, my workstation) has an NTP client that works, it does.  My final proof of that was temporarily enabling the deadliest rule of all--Any=>Any Allow-- and watching NTP work just fine.  Needless to say I don't leave that one on! 

    Dan  
  • Hmmm.... I'll be interested in any response from Astaro then.....

    Cheers,

    Karl