I am trying to setup the NTP server on OpenWRT (the one you can turn on by going to System
->System
->Time Syncronization
->Provide NTP Server
- checked ON) on a dedicated network interface (the reasons are at the end of the post, but tl;dr, it's so i can set up forwarding for ANY of my other zones to access/redirect NTP (and any other services).. hence these shared-services zone name is named "svc")
However my clients' on another vlans cannot reach it only when I set Bind NTP server
to a specific IP in another VLAN:
16:46:09.774040 d0:xx:yy:zz:e1:b8 > 60:xx:yy:zz:bd:10, ethertype 802.1Q (0x8100), length 94: vlan 2220, p 0, ethertype IPv4 (0x0800), 10.22.20.10.47342 > 10.21.23.123.123: NTPv4, Client, length 48
16:46:09.774090 60:xx:yy:zz:bd:10 > d0:xx:yy:zz:e1:b8, ethertype 802.1Q (0x8100), length 122: vlan 2220, p 0, ethertype IPv4 (0x0800), 10.21.23.123 > 10.22.20.10: ICMP 10.21.23.123 udp port 123 unreachable, length 84
What is strange is that they can however reach that same IP if i don't specify an interface to bind to (so the same destination IP now suddenly works):
17:14:57.613789 d0:xx:yy:zz:e1:b8 > 60:xx:yy:zz:bd:10, ethertype 802.1Q (0x8100), length 94: vlan 2220, p 0, ethertype IPv4 (0x0800), 10.22.20.10.50233 > 10.21.23.123.123: NTPv4, Client, length 48
17:14:57.613863 60:xx:yy:zz:bd:10 > d0:xx:yy:zz:e1:b8, ethertype 802.1Q (0x8100), length 94: vlan 2220, p 0, ethertype IPv4 (0x0800), 10.21.23.123.123 > 10.22.20.10.50233: NTPv4, Server, length 48
Things i've looked at:
- making sure I can ping the service-IP from the client-host
16:39:36.146395 d0:xx:yy:zz:e1:b8 > 60:xx:yy:zz:bd:10, ethertype 802.1Q (0x8100), length 102: vlan 2220, p 0, ethertype IPv4 (0x0800), 172.22.20.10 > 172.21.23.123: ICMP echo request, id 25180, seq 1, length 64
16:39:36.146436 60:xx:yy:zz:bd:10 > d0:xx:yy:zz:e1:b8, ethertype 802.1Q (0x8100), length 102: vlan 2220, p 0, ethertype IPv4 (0x0800), 172.21.23.123 > 172.22.20.10: ICMP echo reply, id 25180, seq 1, length 64
- making sure the service is up running & bound correctly using netstat
# netstat -nlup | grep -E '(Active|123)'
Active Internet connections (only servers)
udp 0 0 :::123 :::* 21799/ntpd
(curiously, the netstat output is the same whether i bound it on an interface or not)
- verified in /etc/config/firewall that forwarding is enabled between my lan and the svc zone
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
option drop_invalid '1'
option flow_offloading '1'
option synflood_protect '1'
config zone
option name 'svc'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
list network 'svc'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
config forwarding
option src 'lan'
option dest 'wan'
config forwarding
option src 'lan'
option dest 'svc'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option family 'ipv4'
option target 'ACCEPT'
list icmp_type 'echo-request'
option ipset 'allowed_to_ping'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src '*'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src '*'
option proto 'icmp'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
list icmp_type 'bad-header'
list icmp_type 'destination-unreachable'
list icmp_type 'echo-reply'
list icmp_type 'echo-request'
list icmp_type 'neighbour-advertisement'
list icmp_type 'neighbour-solicitation'
list icmp_type 'packet-too-big'
list icmp_type 'router-advertisement'
list icmp_type 'router-solicitation'
list icmp_type 'time-exceeded'
list icmp_type 'unknown-header-type'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Block-DHCP-DNS-on-WAN'
option src 'wan'
option dest_port '53 67 68'
option target 'DROP'
config rule
option name 'Allow-DHCP-DNS-ICMP'
option src '*'
option dest_port '53 67 68'
option target 'ACCEPT'
list proto 'tcp'
list proto 'udp'
list proto 'icmp'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec NAT-Traversal'
option src 'wan'
option dest_port '4500'
option proto 'udp'
option target 'ACCEPT'
config zone
option name 'iot'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
list network 'iot'
config forwarding
option src 'iot'
option dest 'wan'
config forwarding
option src 'iot'
option dest 'svc'
Some more backstory on this particular config - I have an IOT access-point on another VLAN, and i initially wanted to redirect outgoing NTP traffic to this NTP service instead, but i couldn't get that to work and ended up getting the exact same udp port 123 unreachable
so in order to "simplify" the config, I removed that rule and thought i should get this working first but seems i ran into this issue now which i'm just baffled by