Hi all, followed the openwrt provided tutorial for setting up multiple peers but I haven't been able to successfully complete the handshake between wireguard on my android and my openwrt router.
I am using PPPOE and a VLAN to connect to my ISP, hopefully that doesn't complicate things.
I found a similar situation in the forums here, but I followed their solution and couldn't fix the handshake issue.
See below for information, if there's anything else you need let me know
ubus call system board;
uci export network;
uci export dhcp; uci export firewall;
head -n -0 /etc/firewall.user;
ubus call system board;
{
"kernel": "5.10.161",
"hostname": "OpenWrt",
"system": "ARMv8 Processor rev 4",
"model": "FriendlyElec NanoPi R4S",
"board_name": "friendlyarm,nanopi-r4s",
"rootfs_type": "ext4",
"release": {
"distribution": "OpenWrt",
"version": "22.03.3",
"revision": "r20028-43d71ad93e",
"target": "rockchip/armv8",
"description": "OpenWrt 22.03.3 r20028-43d71ad93e"
}
uci export network;
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 'fd9f:5f21:8150::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'
option igmp_snooping '1'
config device
option name 'eth1'
option macaddr '82:34:28:38:d4:96'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
list dns '192.168.1.1'
config device
option name 'eth0'
option macaddr '80:34:28:38:d4:96'
config interface 'wan'
option proto 'pppoe'
option username 'user'
option password 'password'
option ipv6 'auto'
option device 'eth0.10'
config interface 'wan6'
option device 'eth0'
option proto 'dhcpv6'
config interface 'docker'
option device 'docker0'
option proto 'none'
option auto '0'
config device
option type 'bridge'
option name 'docker0'
config interface 'WG'
option proto 'wireguard'
option private_key 'PRIVATE'
list addresses '10.2.0.2/32'
option peerdns '0'
list dns '10.2.0.1'
config wireguard_WG
option description 'Peer'
option public_key 'PUB'
list allowed_ips '0.0.0.0/0'
config interface 'wg_lan'
option proto 'wireguard'
option private_key 'PRIVATE'
option listen_port '51820'
list addresses '10.0.5.1/24'
option mtu '1420'
config wireguard_wg_lan
option public_key 'PUB'
option preshared_key 'PSK'
option description '1_lan_Alpha'
list allowed_ips '10.0.5.2/32'
option route_allowed_ips '1'
option persistent_keepalive '25'
config wireguard_wg_lan
option public_key 'PUB'
option preshared_key 'PSK'
option description '2_lan_Bravo'
list allowed_ips '10.0.5.3/32'
option route_allowed_ips '1'
option persistent_keepalive '25'
config wireguard_wg_lan
option public_key 'PUB'
option preshared_key 'PSK='
option description '3_lan_Charlie'
list allowed_ips '10.0.5.4/32'
option route_allowed_ips '1'
option persistent_keepalive '25'
config wireguard_wg_lan
option public_key 'PUB'
option preshared_key 'PSK'
option description '4_lan_Delta'
list allowed_ips '10.0.5.5/32'
option route_allowed_ips '1'
option persistent_keepalive '25'
uci export dhcp;
package 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 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'
option confdir '/tmp/dnsmasq.d'
list rebind_domain 'plex.direct'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option ra 'hybrid'
option dhcpv6 'hybrid'
option force '1'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
list ra_flags 'none'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
uci export firewall;
package firewall
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone 'lan'
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option network 'lan wg_lan'
config zone 'wan'
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-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
option name 'Support-UDP-Traceroute'
option src 'wan'
option dest_port '33434:33689'
option proto 'udp'
option family 'ipv4'
option target 'REJECT'
option enabled 'false'
config include
option path '/etc/firewall.user'
config zone 'docker'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option name 'docker'
list network 'docker'
config include
option path '/etc/firewall.fail2ban'
option enabled '1'
option reload '1'
config rule 'wg'
option name 'Allow-WireGuard-lan'
option src 'wan'
option dest_port '51820'
option proto 'udp'
option target 'ACCEPT'
head -n -0 /etc/firewall.user;
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
iptables -A INPUT -s 192.168.1.235 -j DROP
iptables -A INPUT -s 192.168.1.179 -j DROP
wg show
wg show
interface: WG
public key: fQI738oBZ3qmCVaFMf6II+2QfI0SJmeSMECtdKhi3Fw=
private key: (hidden)
listening port: 55436
peer: ErCIBur8/FyI+SpFAXyfJTDOF1rvi3nlYvHnPBz3K3c=
allowed ips: 0.0.0.0/0
interface: wg_lan
public key: ptaRXSpqa0BTPdd9eP84PmXYLox5EiR798O06qEFlWM=
private key: (hidden)
listening port: 51820
peer: keCX2A1riwvOTEkA6CZNBx/ZVzXtsplJZZlSZJWPaxk=
preshared key: (hidden)
allowed ips: 10.0.5.2/32
persistent keepalive: every 25 seconds
peer: /awLaqZhW/gmLBTtpAqV3yKfhDaeAxxAJvLoOMS6ThI=
preshared key: (hidden)
allowed ips: 10.0.5.3/32
persistent keepalive: every 25 seconds
peer: oX+0STf0UwnEhd2oCoAg/HfFfVkTsymucewQ9p2TEC0=
preshared key: (hidden)
allowed ips: 10.0.5.4/32
persistent keepalive: every 25 seconds
peer: 3f80jCN828S+6JQ8rm+/j6QHbaVEWJT5XCTGGaM/8UA=
preshared key: (hidden)
allowed ips: 10.0.5.5/32
persistent keepalive: every 25 seconds