Thanks. I am aware of the overlapping subnet issue but that will have to wait because it would require making changes that I cannot do right now due to other computers at both ends. I will have to find the right moment for that and probably I will have to change the client side, which is local to me. I want to make absolutely sure everything else is working right before I do that.
Maybe I can think of something like firing up an extra computer with a different subnet just for testing but I am trying to keep it simple as even keeping simple is too complicated for me.
I have made the other changes but still cannot ping 10.8.1.1
This is what the client looks like now:
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 ula_prefix '...::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
option ipv6 '0'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.0.1'
option delegate '0'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0.2'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '0'
option enable_vlan4k '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 5t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0 5t'
config interface 'wwan'
option proto 'dhcp'
config interface 'WG_VPN'
option proto 'wireguard'
option private_key '...='
list addresses '10.8.1.2/24'
config wireguard_WG_VPN
option endpoint_host '....'
option endpoint_port '5p9'
option description 'VPNserver'
option public_key '...='
option private_key '...='
option persistent_keepalive '25'
option route_allowed_ips '1'
config device
option name 'eth0'
option ipv6 '0'
= = = = = = = = = = = = = = = = =
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
option family 'ipv4'
config zone
option name 'wan'
option output 'ACCEPT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
list network 'wwan'
option input 'REJECT'
option forward 'REJECT'
config forwarding
option src 'lan'
option dest 'wan'
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 icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
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 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'REJECT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option family 'ipv6'
list src_ip '...::/10'
option target 'REJECT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
option limit '1000/sec'
option family 'ipv6'
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'
option target 'REJECT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
option limit '1000/sec'
option family 'ipv6'
list icmp_type 'bad-header'
list icmp_type 'destination-unreachable'
list icmp_type 'echo-reply'
list icmp_type 'echo-request'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'unknown-header-type'
option target 'REJECT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
option family 'ipv4'
config zone
option name 'WG_VPN'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option masq '1'
list network 'WG_VPN'
config forwarding
option src 'lan'
option dest 'WG_VPN'
config forwarding
option src 'WG_VPN'
option dest 'wan'
config forwarding
option src 'WG_VPN'
option dest 'lan'
= = = = = = = = = = = = = = = = =
YES!!!! Thank You! That finally did the trick! I can see with Traceroute that my traffic goes out to the Internet at the other end of the tunnel. So it is working. It has taken me over a month to get here! Thank you all for your help and patience!
I guess the first thing will be to back up all configs so I can always recover to this point if anything goes wrong.
Now, I want to be able to enable and disable the tunnel with the click of a button or script. I tried simply disabling the WG_VPN interface but then I have no internet access at all.
How can I do it so that I can enable the VPN or disable it and have traffic go out the usual non-vpn route?
BTW, the router takes something like 2.5 minutes to reboot which I do not understand. It doesn't take my main computer that long.
Edit: it is taking longer now. In the log I see this error which is probably what is slowing the router down. The log is flooded with this:
daemon.err odhcpd[1390]: Failed to send to ff02::1%lan@br-lan (Network unreachable)
It looks like IPV6 related. What can I do about this?
On power-up LUCI also gives the error "XHR request timed out" which might be related.