Hello all,
I'm trying to set up a WG S2S connection between two OpenWRT devices.
Site A: 192.168.1.0/24
Site B: 192.168.10.0/24
VPN: 192.168.9.0/24
Site A:
/etc/config/network
[...]
config interface 'vpn'
option proto 'wireguard'
option private_key 'DELETED'
option listen_port '51820'
list addresses '192.168.9.1/24'
[...]
config wireguard_vpn 'spare02'
option public_key ''
option preshared_key ''
list allowed_ips '192.168.10.0/24'
list allowed_ips '192.168.9.17/32'
option description 'spare02'
option route_allowed_ips '1'
[...]
/etc/config/firewall
[...]
config zone 'lan'
option name 'lan'
list network 'lan'
list network 'vpn'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list device 'tun0'
[...]
ip r
default via 192.168.1.1 dev br-lan proto static
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.2
192.168.8.0/24 dev tun0 proto kernel scope link src 192.168.8.1
192.168.9.0/24 dev vpn proto kernel scope link src 192.168.9.1
192.168.9.17 dev vpn proto static scope link <--------------------------------- ??
192.168.10.0/24 dev vpn proto static scope link
Site B:
/etc/config/network
[...]
config interface 'vpn'
option proto 'wireguard'
option private_key 'DELETED'
list addresses '192.168.9.17/24'
list addresses 'fdf1:e8a1:8d3f:9::1'
config wireguard_vpn 'wgserver'
option public_key 'DELETED'
option preshared_key 'DELETED'
option endpoint_host 'DELETED'
option endpoint_port '51820'
option route_allowed_ips '1'
option persistent_keepalive '25'
list allowed_ips '192.168.1.0/24'
[...]
/etc/config/firewall
[...]
config zone 'lan'
option name 'lan'
list network 'lan'
list network 'vpn'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
[...]
ip r
default via 192.168.4.1 dev eth0.2 proto static src 192.168.4.214
EXT_IP_DELETED via 192.168.4.1 dev eth0.2 proto static
192.168.1.0/24 dev vpn proto static scope link
192.168.4.0/24 dev eth0.2 proto kernel scope link src 192.168.4.214
192.168.9.0/24 dev vpn proto kernel scope link src 192.168.9.17
192.168.10.0/24 dev br-lan proto kernel scope link src 192.168.10.1
Now, there are some things that I don't understand, for example:
- Why in the route table of the site A, there is a line with the VPN address of the site B?
192.168.9.17 dev vpn proto static scope link <--------------------------------- ??
- The two OpenWRT devices cannot ping each other 192.168.9.0/24 class ip but the clients can ping the other site.
router on site A
PING 192.168.9.17 (192.168.9.17): 56 data bytes
^C
--- 192.168.9.17 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
router on site B
PING 192.168.9.1 (192.168.9.1): 56 data bytes
ping: sendto: No error information
Cheers