Using an NTP-server behind NAT, it works! After testing a lot. No not many routers/OS can handle it. Really not many

Ok it works. To summerize for others I use my system as example:

  1. Check ‘ip a’ :
root@OpenWrt:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
    link/ether 00:e2:69:9e:33:5e brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:e2:69:9e:33:5f brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:e2:69:9e:33:60 brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:e2:69:9e:33:61 brd ff:ff:ff:ff:ff:ff
6: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:e2:69:9e:33:62 brd ff:ff:ff:ff:ff:ff
7: eth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:e2:69:9e:33:63 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2e2:69ff:fe9e:3363/64 scope link 
       valid_lft forever preferred_lft forever
8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:e2:69:9e:33:5e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fda9:9e:825d::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::2e2:69ff:fe9e:335e/64 scope link 
       valid_lft forever preferred_lft forever
9: eth5.10@eth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:e2:69:9e:33:63 brd ff:ff:ff:ff:ff:ff
10: pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc noqueue state UNKNOWN qlen 1024
    link/ppp 
    inet 185.142.225.68 peer 109.233.104.27/32 scope global pppoe-wan
       valid_lft forever preferred_lft forever
    inet6 fe80::888a:cb2d:40f0:c33f/128 scope link flags 02 
       valid_lft forever preferred_lft forever

My WAN-IP (public IP) is 185.142.225.68
My WAN-Adapter is pppoe-wan

My LAN-IP (of the NTP-server) is 192.168.1.50
My LAN-adapter is br-lan

Check your own config makes it so much easier to do.

  1. nano /etc/nftables.d/90-stateless-ntp.nft and copy the code in it:
chain ntp_prerouting {
         type filter hook prerouting priority raw;
         iif pppoe-wan udp dport { 123 } ip daddr 185.142.225.68 ip daddr set 192.168.1.50 notrack
         iif br-lan udp sport { 123 } ip saddr 192.168.1.50 notrack
 }

 chain ntp_postrouting {
         type filter hook postrouting priority raw;
         oif pppoe-wan udp sport { 123 } ip saddr 192.168.1.50 ip saddr set 185.142.225.68
 }

alter it to your settings and reboot the router.

  1. check Status → Firewall it should show this at the top:

  1. Make a rule Network → Firewall → Traffic → Add:

  1. check the rule in ‘cat /etc/config/firewall’ it should read:
config rule
	option src 'wan'
	option dest 'lan'
	option dest_port '123'
	option proto 'udp'
	option target 'ACCEPT'
	option name 'NTP-notrack-with-extra-config'
	list dest_ip '192.168.1.50'
	option enabled '1'
  1. change the firewall connection parameters, the default is too low, ‘nano /etc/sysctl.conf’ mine looks like this:
net.netfilter.nf_conntrack_acct=1
net.netfilter.nf_conntrack_checksum=0
net.netfilter.nf_conntrack_udp_timeout=15
net.netfilter.nf_conntrack_udp_timeout_stream=180
net.netfilter.nf_flowtable_udp_timeout=15
net.netfilter.nf_conntrack_max=300000

activate with ‘sysctl -p’

  1. check the connections in the status window of OpenWRT, mine running with 3Gbit setting:

See traffic at >800 packages per second:

  1. Check if your incoming and outgoing still works. The Pool’s NTP-check is a good tool and should pass.

That’s it! Very major big thanks to @mlichvar who worked this out and explained it to me.

And sorry guy’s if I annoyed you, but I’m not a good firewall rule-writer.
I get there, in the end with some help. :+1:

I hope this helps others that may have the same problem when traffic goes high.