PPPoE + Wireguard on the same router

Hi all,
This is my first post here and also the very first time using OpenWrt . I have a TP Link Archer C50 router.
I am able to successfully configure the PPPoE and Wireguard VPN services . Both are connected and status of Wireguard shows handshake successful.
However the router itself does not use the Wireguard service at all. It defaults to the ISP's public IP. WhatIsmyIP.com always shows the ISP's ip. Could anyone help me fix this issue please?

Here are some details which may be of interest.


 cat /etc/config/network; cat /etc/config/firewall; ip -4 addr ; ip -4 ro ; ip -4 ru

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

config globals 'globals'
	option ula_prefix 'fdad:a5f8:c80c::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_eth0_1_dev'
	option name 'eth0.1'
	option macaddr '98:da:c4:1e:5d:40'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'pppoe'
	option password 'pwd'
	option ipv6 'auto'
	option username 'user'

config device 'wan_eth0_2_dev'
	option name 'eth0.2'
	option macaddr '98:da:c4:2e:5d:1a

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 2 3 4 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '0 6t'

config interface 'PS1'
	option proto 'wireguard'
	option private_key 'Spriv_key=!'
	option listen_port '61820'
	list addresses '10.100.0.2/32'

config wireguard_PS1
	option public_key 'Hpub_key'
	list allowed_ips '0.0.0.0/0'
	list allowed_ips '::/0'
	option endpoint_port '61820'
	option persistent_keepalive '25'
	option endpoint_host '153.100.208.80'
	option preshared_key 'ps_key'

config rule
	option out 'wan'
	option lookup '100'

config route 'name_your_route'
	option interface 'wan'
	option target '0.0.0.0'
	option netmask '0.0.0.0'
	option table '100'


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'
	option network 'lan'

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	option network 'wan6'

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 src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	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 include
	option path '/etc/firewall.user'

config zone
	option name 'wireguard'
	option mtu_fix '1'
	option masq '1'
	option output 'ACCEPT'
	option input 'REJECT'
	option forward 'REJECT'
	option network 'PS1 wan'

config forwarding
	option dest 'wireguard'
	option src 'lan'

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

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
56: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
64: pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN group default qlen 3
    inet 10.234.22.20 peer 10.234.0.1/32 scope global pppoe-wan
       valid_lft forever preferred_lft forever
65: PS1: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 10.100.0.2/32 brd 255.255.255.255 scope global PS1
       valid_lft forever preferred_lft forever
default via 10.234.0.1 dev pppoe-wan proto static
10.234.0.1 dev pppoe-wan proto kernel scope link src 10.234.22.20
153.100.208.80 via 10.234.0.1 dev pppoe-wan proto static
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
0:	from all lookup local
1:	from all oif pppoe-wan lookup 100
32766:	from all lookup main
32767:	from all lookup default ```
1 Like

Wireguard status is as shown below


**Public Key:** pub_key
**Listen Port:** 61820

Peer

![](http://192.168.1.1/luci-static/resources/icons/tunnel.png)

**Public Key:** pub_key
**Endpoint:** 153.100.208.80:61820
**Allowed IPs:**
• 0.0.0.0/0
• ::/0
**Persistent Keepalive:** 25s
**Latest Handshake:** Tue, 30 Mar 2021 07:43:55 GMT (37s ago)
**Data Received:** 2 KiB
**Data Transmitted:** 4 KiB
uci -q delete network.@rule[0]
uci -q delete network.@route[0]
uci set network.@wireguard_PS1[0].route_allowed_ips="1"
uci commit network
/etc/init.d/network restart
2 Likes

Thank you. @vgaetera . I am getting this error message in the logs

Tue Mar 30 09:34:21 2021 daemon.warn odhcpd[964]: A default route is present but there is no public prefix on lan thus we don't announce a default route!

https://openwrt.org/docs/guide-user/network/ipv6/ipv6_extras#missing_gua_prefix

@vgaetera , thank you for this. However, i still have no access to the internet .

Run traceroute from your router and PC:

traceroute 8.8.8.8
traceroute6 2001:4860:4860::8888
traceroute openwrt.org
traceroute6 openwrt.org

Check both connected and disconnected VPN.

Wireguard VPN is showing connected, PPPoE is also connected.

traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 38 byte packets
 1  10.110.0.1 (10.110.0.1)  254.105 ms  253.993 ms  254.100 ms
 2  *  *  *
 3  10.78.4.6 (10.78.4.6)  256.677 ms  254.257 ms  255.295 ms
 4  138.197.249.82 (138.197.249.82)  255.982 ms  255.211 ms  255.541 ms
 5  72.14.219.10 (72.14.219.10)  265.935 ms  162.243.190.33 (162.243.190.33)  347.306 ms  256.138 ms
 6  108.170.250.225 (108.170.250.225)  256.174 ms  255.814 ms  74.125.244.145 (74.125.244.145)  258.061 ms
 7  216.239.42.139 (216.239.42.139)  257.239 ms  216.239.40.255 (216.239.40.255)  256.831 ms  108.170.226.221 (108.170.226.221)  256.586 ms
 8  8.8.8.8 (8.8.8.8)  256.275 ms  254.863 ms  256.433 ms
traceroute6 2001:4860:4860::8888
traceroute to 2001:4860:4860::8888 (2001:4860:4860::8888), 30 hops max, 64 byte packets
 1  *  *  *
 2  *  *  *
 3  *  *  *
 4  *  *  *
 5  *  *  *
 6  *  *  *
 7  *  *  *
 8  *  *  *
 9  *  *  *
 traceroute openwrt.org
traceroute: bad address 'openwrt.org'
traceroute6 openwrt.org
traceroute6: bad address 'openwrt.org'
1 Like

I'm seeing this in the Routes section. PS1 is the VPN connection which seems to lead nowhere.

@vgaetera , thank you for the DNS link. It works perfectly now. the Wireguard VPN IPs showing up correctly

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.