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.
  • Did you the DNAT / SNAT configuration right?

    Axel  
  • Very possibly not; because I don't understand what DNAT/SNAT is, and everything else seemed fine without it, I have never touched it!   [:$]

    Talk to me, I'm listening!    
  • NTP should be port 123 (network time protocol). Iana defines port 37 as "time".   
  • I've actually opened both 37 and 123 for both TCP and UDP.  The reason I focused on 37 in this thread is that's where the packets are being dropped in my log.  
  • Hey There,
    You are going to want to create a DNAT rule 

    ANY / External_Interface_/ NTP 

    SRC Translation: None
    DST Translation: Internal Host Address (192.168.x.x which must be predefined)

    Then you put a packet filter rule in place that says something like:

    Internal host  ----> NTP ----> ANY   

    (and then the return rule)

    ANY ---> NTP ----> Internal host

    I think that will get it done.

    MJT  
  • Thanks for the suggestion, Michael, but I tried exactly the settings you recommended and saw no difference on either the TCP or UDP attempts (still dropped), but it *did* prevent the client's SNMP connection which worked before!  (this didn't show in the packet filter log so I'm guessing it's the DNAT that "broke" it).  So we still have no answer. . .  
  • 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  
  • 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