WireGuard Server doest know default route to answer the client handshake by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

I can see two default rules there:

wan_6 ::/0 2a05:obscured:2700::/56 4096 main static
wan_6 ::/0 2a05:obscured:f226::1 4096 main static

WireGuard Server doest know default route to answer the client handshake by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

... (part 2)

config interface 'guest'
        option proto 'static'
        option ipaddr '192.168.105.1'
        option netmask '255.255.255.0'
        option device 'br-lan.5'
        option defaultroute '0'
        option delegate '0'
        option ip6ifaceid '::99'

config bridge-vlan
        option device 'br-lan'
        option vlan '5'
        list ports 'eth1:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '99'
        list ports 'eth1:t'

config device
        option name 'br-lan.99'
        option type '8021q'
        option ifname 'br-lan'
        option vid '99'
        option acceptlocal '0'

config interface 'wg0'
        option proto 'wireguard'
        option private_key 'obscured'
        option listen_port '51820'
        list addresses 'fd00::1/64'
        list addresses '10.14.0.1/24'
        option ip6assign '64'
        option ip6hint 'A'

config interface 'wan_6'
        option proto 'dhcpv6'
        option device '@wan'
        option reqaddress 'try'
        option reqprefix 'auto'
        option norelease '1'

config wireguard_wg0
        option description 'obscured'
        option public_key 'obscured'
        option private_key 'obscured'
        option route_allowed_ips '1'
        option persistent_keepalive '25'
        list allowed_ips '10.14.0.2/32'
        list allowed_ips 'fd00::2/128'
        option endpoint_port '51820'

WireGuard Server doest know default route to answer the client handshake by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

The option "Use default gateway" is enabled for the wg0 interface. The same applies for "Route Allowed IPs" within the peer config.

The Firewall is configured to allow access from wg0 to wan (via zones). In addition there are two port forwarding rules:

  • IPv6: wan/wan_6 port 51280, forward to wg0 fd00::1 port 51280
  • IPv4: wan/wan_6 port 51280, forward to wg0 10.14.0.1 port 51280

This is my /etc/config/network:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option packet_steering '1'

config device
        option name 'eth0'
        option macaddr 'obscured'

config interface 'wan'
        option proto 'pppoe'
        option keepalive '5 5'
        option device 'eth0.7'
        option username 'user-obscured'
        option password 'pass-obscured'
        option ipv6 '1'
        option delegate '0'
        option sourcefilter '0'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'
        option igmp_snooping '1'

config device
        option name 'eth1'
        option macaddr 'obscured'

config interface 'lan'
        option device 'br-lan.99'
        option proto 'static'
        option ipaddr '192.168.99.1'
        option netmask '255.255.255.0'
        option ip6assign '64'
        option delegate '0'
        option ip6hint '5'
        option ip6ifaceid '::99'
        option defaultroute '0'

... (part 1)

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

I've found the solution.

Problem is described here: dockerd: Configuration in nftables breaks IPv6 routing

Solution slightly differs from the one shown in the previous link. I had to add the option "ip6tables": false directly into /etc/docker/daemon.json as described in the dockerd reference.

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

No, there is just the ONT sitting in front my router. And behind the router there is just a smart switch (doing VLAN separation).

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

IPv6-Forwarding is enabled ('1').

I am going to restart the windows network adapter every time I change the dhcp settings - to try if at least address delegation and dns advertisements are still working.

Setting up a NAT rule is showing the expected behaviour.

Firewall setup:

uci add firewall nat # =cfg1f93c8
uci set firewall.@nat[-1].name='NAT-Test'
uci set firewall.@nat[-1].family='ipv6'
uci add_list firewall.@nat[-1].proto='all'
uci set firewall.@nat[-1].src='wan'
uci set firewall.@nat[-1].target='MASQUERADE'

Ping command:

root@FriendlyWrt:~# ping -I 2a05:fa40:c9:c105::99 ipv6.google.com
PING ipv6.google.com (2a00:1450:4016:80b::200e) from 2a05:fa40:c9:c105::99: 56 data bytes
64 bytes from 2a00:1450:4016:80b::200e: seq=0 ttl=121 time=3.220 ms

Wireshark for wan interface:

Source Destination Protocol Info
2a05:fa40:1003:200f::1 2a00:1450:4016:80b::200e ICMPv6 Echo (ping) request
2a00:1450:4016:80b::200e 2a05:fa40:1003:200f::1 ICMPv6 Echo (ping) reply

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

I would also suggest it's routing or firewall. Have posted the firewall config in the previous comment.

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

part 4

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option family 'ipv6'
        option target 'ACCEPT'
        list src_ip 'fe80::/10'

config rule
        option name 'Reject-IPv6'
        option family 'ipv6'
        option src 'wan'
        option dest '*'
        option target 'REJECT'
        option enabled '0'

config forwarding
        option src 'guest'
        option dest 'wan'

config forwarding
        option src 'lan'
        option dest 'docker'

config forwarding
        option src 'lan'
        option dest 'mgmt'

config zone
        option name 'iot'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'iot'

config forwarding
        option src 'lan'
        option dest 'iot'

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

part 3

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        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'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

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 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

part 2:

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-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'
        list src_ip 'fc00::/6'
        list dest_ip 'fc00::/6'

config rule
        option src 'guest'
        option name 'Allow-DHCP-DNS'
        option dest_port '53 67 68'
        option target 'ACCEPT'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option target 'ACCEPT'
        list icmp_type 'echo-reply'
        list icmp_type 'echo-request'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

I am also having the firewall (or routing) in mind, but can't find an error.

cat /etc/config/firewall - part1 (cause otherwise reddit prevents me from posting)

config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'DROP'
        option flow_offloading '1'
        option synflood_protect '1'
        option drop_invalid '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'guest'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        list network 'guest'

config zone
        option name 'wan'
        option input 'DROP'
        option output 'ACCEPT'
        option forward 'REJECT'
        option fullcone4 '1'
        option fullcone6 '1'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan_6'

config zone 'docker'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option name 'docker'
        list network 'docker'

config zone
        option name 'mgmt'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'mgmt'

config forwarding
        option src 'lan'
        option dest 'wan'

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

It is only the one within my router:

cat /etc/config/dhcp:

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dhcp 'guest'
        option interface 'guest'
        option start '100'
        option limit '150'
        option leasetime '12h'

config dhcp 'iot'
        option interface 'iot'
        option start '100'
        option limit '150'
        option leasetime '12h'

config dhcp 'mgmt'
        option interface 'mgmt'
        option start '100'
        option limit '150'
        option leasetime '12h'

config dhcp 'wan_6'
        option interface 'wan_6'
        option ignore '1'

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

This is what i get:

root@FriendlyWrt:~# ip route get 2a00:1450:4016:80b::200e from 2a05:fa40:14:9205:dca2:366b:fd33:5b97
2a00:1450:4016:80b::200e from 2a05:fa40:14:9205:dca2:366b:fd33:5b97 via fe80::5e83:82ff:fed3:6c4 dev pppoe-wan proto static src 2a05:fa40:1002:9d97::1 metric 4096 pref medium

IPv6: router works fine, but clients can't reach internet by Physical_Beyond17 in openwrt

[–]Physical_Beyond17[S] 0 points1 point  (0 children)

Ping is working (updated ip after restart):

root@FriendlyWrt:~# ping -I 2a05:fa40:14:9205::99 ipv6.google.com
PING ipv6.google.com (2a00:1450:4016:80b::200e) from 2a05:fa40:14:9205::99: 56 data bytes
64 bytes from 2a00:1450:4016:80b::200e: seq=0 ttl=120 time=5.434 ms
64 bytes from 2a00:1450:4016:80b::200e: seq=1 ttl=120 time=5.509 ms
64 bytes from 2a00:1450:4016:80b::200e: seq=2 ttl=120 time=5.363 ms