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 through ASL 3.210 (Masq/NAT issue)

I'm trying to allow a host NTP access through
ASL (NTP port 123 in both directions) however, currently without success.

I think this is related to a Masq/NAT.

Looking at the packet filter logs I can see that I have the following filter/NAT rules:

Chain AUTO_OUTPUT (1 references)
 pkts bytes target     prot opt in     out   source               destination         
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            ntpserver    udp spts:1024:65535 dpt:123 

Chain USR_INPUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     udp  --  *      *       ntpserver      externalIP     udp spt:123 dpt:123 

Chain USR_OUTPUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     udp  --  *      *       externalIP       ntpserver    udp spt:123 dpt:123 

Chain AUTO_NAT_OUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       udp  --  *      *       ntpserver      externalIP     udp spt:123 dpt:123 to:NTPclientLAN:123 

Chain AUTO_NAT_POST (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 SNAT       udp  --  *      *       NTPclientLAN         ntpserver    udp spt:123 dpt:123 to:externalIP:123 
   25  1520 MASQUERADE  all  --  *      eth1    LAN       0.0.0.0/0          

Chain AUTO_NAT_PRE (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       udp  --  *      *       ntpserver      externalIP     udp spt:123 dpt:123 to:NTPclientLAN:123

I have setup the following NAT rules:

Private_network -> All/All, Src translation: MASQ_eth, Dst translation: none

NTPclient -> ntpserver / NTP, Src translation: to eth / NTP, Dst translation: none

ntpserver -> eth / NTP, Src translation: none, Dst translation: NTPclient / NTP

NTPclient is on LAN, ntpserver is on Internet.

I have the following packet rules:

eth, NTP, ntpserver, allow
ntpserver, NTP, eth, allow

However, from the packet filter violation log I have entries:

date, ntpclientIP, 123, ->, ntpserver, 123, udp

Seems like NAT'ing isn't working.

What am I doing wrong?

Initially I thought there might be a conflict with ASL using NTP (or ntpdate), but ASL uses an async. mode (client host port not equal to 123), and also, I use a different ntp server for ASL and another one for the LAN.

Why aren't NAT'ing ordered, like the packet filtering is? How is a package changed if it matches two NAT rules?

I'm looking forward to hearing from you!

Michael
 
 [size="1"][ 15 October 2002, 07:48: Message edited by: Michael Jenner ][/size]


This thread was automatically locked due to age.
Parents
  • For the internal clients to access the NTP all you should need is the ANY ANY Allow NAT Rule. If you need the NTP server to access the internal clients you should have:

    DNAT
    ANY / Ext_IF / NTP   None   IntNTPServer

    Packet Rule 
    ANY / NTP -> IntNTPServer  Allow

    This should take of it
  • Ok, my packet filtering rules where wrong, and for a good reason if I may say so. I read the NAT explanation and IMHO it is wrong.

    DNAT applies before the FWD packet filter,
    SNAT applies after the FWD packet filter.

    and hence the packet filter rules should be:

    DNAT case: According to src/dst _after_ translation.

    SNAT case: According to src/dst _before_
    translation.

    The ASL faq states exactly the opposite???

    Assuming I'm correct, I changed the package filters to:

    NTPClient, NTP, Any, Allow
    Any, NTP, NTPClient, Allow

    Unfortunately, I still cannot access the external ntp server.

    Please help!

    Michael
  • i have the same problems with ntp

    tested with masquerading and all ports open
    (program sync-it)

    i also tested with additional dnat but i can't syncronize

    --

    on a computer directly conneted to the internet
    using zone-alarm and only port 123 udp open
    i can syncronize the time without problems

    does anyone know how to configurate ntp
    on astaro?

      [:S]
Reply
  • i have the same problems with ntp

    tested with masquerading and all ports open
    (program sync-it)

    i also tested with additional dnat but i can't syncronize

    --

    on a computer directly conneted to the internet
    using zone-alarm and only port 123 udp open
    i can syncronize the time without problems

    does anyone know how to configurate ntp
    on astaro?

      [:S]
Children
  • Have you tried taking ASL out of the picture like Blue.

    Try changing the port assignments on ntpservice to
    ntpserver udp spts:0:65535

    Have you turned ICMP off on the ASL?

    Also can you ping the NTP server from behind ASL and without, and what about a traceroute to the NTP server. If either of these fail somewhere on the I-net may be lossing it try another NTP server