Hi all,
I am trying to create a site-to-site wireguard connection to join two LANS. I can get the two devices to communicate but not ping from one network to the other. I used the script: https://openwrt.org/docs/guide-user/services/vpn/wireguard/site-to-site
-- Main Site --
device without making routing connected only to the LAN port. In the main router there's already a static route to 192.168.50.0/24 as a traceroute from a LAN PCs shows:
tracert 192.168.50.254
Tracing route to 192.168.50.254 over a maximum of 30 hops
1 * * * Request timed out.
2 1 ms 6 ms 1 ms vpn01.xxx.lan [192.168.200.30]
3 13 ms 13 ms 13 ms 192.168.50.254
but cannot ping (perhaps because the WAN port doesn't respond to pings)
Configs from device in Main Site:
package 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 ula_prefix 'fd72:6414:7918::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.200.30'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '192.168.200.254'
list dns '192.168.200.1'
list dns '192.168.200.2'
list dns_search 'xxx.lan'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config interface 'Wireguard_xxx'
option proto 'wireguard'
option private_key '####'
option listen_port '51820'
config wireguard_Wireguard_xxx 's2s_vpn_Exterior'
option public_key '####'
option preshared_key '####'
option description 'Exterior, wrgxxx.duckdns.org'
list allowed_ips '192.168.50.0/24'
list allowed_ips 'fd96:b46d:9fcc::/48'
option route_allowed_ips '1'
option persistent_keepalive '25'
option endpoint_host 'xxxxxx.duckdns.org'
option endpoint_port '51820'
package firewall
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
list network 'Wireguard_xxx'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
config rule
option name 'Allow-Control'
list proto 'tcp'
option src 'lan'
list src_ip '192.168.200.12'
list src_ip '192.168.200.13'
list dest_ip '192.168.200.30'
option dest_port '22 80 443'
option target 'ACCEPT'
config rule 'wg_s2s_51820'
option name 'Allow-WireGuard-51820'
option src 'lan'
option dest_port '51820'
option proto 'udp'
option target 'ACCEPT'
Route command
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.200.254 0.0.0.0 UG 0 0 0 br-lan
2.82.107.65 192.168.200.254 255.255.255.255 UGH 0 0 0 br-lan
192.168.50.0 * 255.255.255.0 U 0 0 0 Wireguard_xxx
192.168.200.0 * 255.255.255.0 U 0 0 0 br-lan
-- Secondary Site --
device connected to WAN to ISP router. Clients connect to this device in Wireless
I can't make traceroute to main site from router:
traceroute 192.168.200.30
traceroute to 192.168.200.30 (192.168.200.30), 30 hops max, 46 byte packets
1 * * *
2 * * *
3 * * *
package 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 ula_prefix 'fd96:b46d:9fcc::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.50.254'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config interface 'Wireguard_Ext'
option proto 'wireguard'
option private_key '######'
option listen_port '51820'
config wireguard_Wireguard_Ext 's2s_vpn_CINEL'
option public_key '######'
option preshared_key '######'
option description 'CINEL, 194.79.xxx.xxx'
list allowed_ips '192.168.200.0/24'
list allowed_ips 'fd72:6414:7918::/48'
option route_allowed_ips '1'
option persistent_keepalive '25'
option endpoint_host '194.79.xxx.xxx'
option endpoint_port '51820'
package firewall
config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
list network 'Wireguard_Ext'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-Control-CINEL'
list proto 'tcp'
option src 'wan'
list src_ip '194.79.xxx.xxx'
option target 'ACCEPT'
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 '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 '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'
config rule 'wg_s2s_51820'
option name 'Allow-WireGuard-51820'
option src 'wan'
option dest_port '51820'
option proto 'udp'
option target 'ACCEPT'
Route command
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.254 0.0.0.0 UG 0 0 0 wan
192.168.1.0 * 255.255.255.0 U 0 0 0 wan
192.168.50.0 * 255.255.255.0 U 0 0 0 br-lan
192.168.200.0 * 255.255.255.0 U 0 0 0 Wireguard_Ext
194.79.xxx.xxx 192.168.1.254 255.255.255.255 UGH 0 0 0 wan