PPPoE server with 2 laptops work, but with openwrt to laptop doesn’t

This is not just PPPOE. I have an Openwrt Router, but I want to share it to another router, with PPPOE. It actually works with DHCP well, but I need it with PPPOE instead. And with VLAN 35 too. Which this complicates things I think.

I installed roaring penguin PPPOE server, but many of stuff missing on the wiki page. I've done some educated guesses on some stuff. There is some config I post here:

root@OpenWrt-AX59U:/etc/ppp# cat pppoe-server-options 

require-pap
login
lcp-echo-interval 20
lcp-echo-failure 3
ms-dns 8.8.8.8
ms-dns 8.8.4.4
mtu 1492
mru 1492

root@OpenWrt-AX59U:/etc/ppp# cat pap-secrets 
# client	server		secret		IP addresses
#*		*		*		*
testuser * testpass *

root@OpenWrt-AX59U:/etc/ppp# cat chap-secrets 
#USERNAME  PROVIDER  PASSWORD  IPADDRESS
testuser * testpass *

root@OpenWrt-AX59U:/etc/ppp# pppoe-server -I lan1.35 -L 192.168.2.1 -R 192.168.2
.2 -N 64
#this is how I run the pppoe-server

When I run DHCP without PPPOE, the other router gets an ip like 196.168.5.156, which my openwrt router is 192.168.5.1 However this doesn't happen on the PPPOE here. It won't get an IP.

I know this is a very hard topic. But I need this.

I want make it work like openwrt > laptop via PPPOE vlan 35, but couldn’t make it. I’ve tried to make it work with 2 laptops instead. Which one of them gets internet via wlan, then serves the internet via pppoe vlan35, to other laptop via cable. It worked great, both laptops are in Debian 12.

But is it possible to remove one laptop from this equation and put openwrt router as pppoe server? Also I am using vlan 35 here. This was how it worked for 2 laptops. I've tried to improvise these steps for openwrt router, but to no avail. It just won't work. See this too. This is on the openwrt router, i set lan1 exactly the same way I did for the laptop.
resim

On both laptops first:

sudo apt install vlan

On the pppoe server laptop:

sudo ip link add link enp2s0 name enp2s0.35 type vlan id 35

sudo ip link set enp2s0.35 up

sudo apt install pppoe pppoe-server

sudo nano /etc/ppp/pppoe-server-options

#add these to the file

require-pap

login

lcp-echo-interval 10

lcp-echo-failure 2

ms-dns 8.8.8.8

ms-dns 8.8.4.4

noauth

sudo nano /etc/ppp/pap-secrets

#add these

test laptop * test pass *

sudo sysctl -w net.ipv4.ip_forward=1

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

#change wlan0 to what you have as wlan interface

sudo pppoe-server -I enp2s0. 35 -L 192.168.100.1 -R 192.168.100.10 -N 10

On the client laptop:

sudo ip link add link enp4s0 name enp4s0.35 type vlan id 35

sudo ip link set enp4s0.35 up

sudo pppoeconf enp2s0.35

sudo nano /etc/ppp/peers/dsl-provider

in this file there it says enp2s0.35.35, delete one 35 and make it like this:

enp2s0.35.35

Then on the client laptop:

sudo pon dsl-provider

Fsirly obvious - no openwrt in picture, it does not work. This is not ubuntu support

Openwrt has an optional pppoe-server package https://openwrt.org/user/ahorner/pppoe_server_guide

What should I post? I have an AX59U. I do run the pppoe-server with this command:

root@OpenWrt-AX59U:~#  pppoe-server -I lan1.35 -L 192.168.100.1 -R 192.168.100.1
0 -N 10
root@OpenWrt-AX59U:~# ps | grep pppoe-server
26886 root       992 S    pppoe-server -I lan1.35 -L 192.168.100.1 -R 192.168.
26888 root      1336 S    grep pppoe-server

Also this is the lan1.35:

That guide is fairly incomplete. Probably too old either. I tried it before. So here are the relevant files, I do pap authentication btw:

root@OpenWrt-AX59U:~# cat /etc/ppp/pppoe-server-options 
require-pap
require-chap
login
lcp-echo-interval 20
lcp-echo-failure 3
ms-dns 1.1.1.1
ms-dns 8.8.8.8
root@OpenWrt-AX59U:~# cat /etc/config/pppoe

config pppoe 'server'
	option interface 'lan1.35'
	option localip '192.168.35.1'
	option remoteip '192.168.35.10-192.168.35.20'
	option pppd_options 'plugin radius.so'
	option enabled '1'

config login
	option username 'testuser'
	option password 'testpass'

config pppoe_server
	option enabled '1'
	option interface 'lan1.35'
	option maxsessionsperpeer '0'
	option timeout '0'
	list service_name 'test'

root@OpenWrt-AX59U:~# cat /etc/ppp/pap-secrets 
# client	server		secret		IP addresses
#*		*		*		*
testuser * testpass *


PPPoE Server Issue might contain some useful info.

Well almost done, on the laptop ppp0 gets created for a second, then gets destroyed. My bet is some firewall issue maybe. I also tried to took tcpdump from the router side. The thing keeps shutting down. Anyway if this doesn't work out I'd rather use a mini PC. No worries:

root@OpenWrt-AX59U:~# tcpdump -i lan1.35 -nn -v ether proto 0x8863 or ether proto 0x8864
tcpdump: listening on lan1.35, link-type EN10MB (Ethernet), snapshot length 262144 bytes
19:13:37.647504 PPPoE PADI [Service-Name]
19:13:37.647586 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.387233 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.387317 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:13:59.387475 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.387855 PPPoE PADS [ses 0x1] [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.416476 PPPoE  [ses 0x1] LCP, Conf-Request (0x01), id 1, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0x6dbe6f6d
19:13:59.465892 PPPoE PADT [ses 0x1] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:13:59.519224 PPPoE PADT [ses 0x1] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.575231 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.575295 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:13:59.575531 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.575867 PPPoE PADS [ses 0x2] [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.588614 PPPoE  [ses 0x2] LCP, Conf-Request (0x01), id 2, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0x5590cb90
19:13:59.635892 PPPoE PADT [ses 0x2] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:13:59.687401 PPPoE PADT [ses 0x2] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.715423 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.715495 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:13:59.715723 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.716047 PPPoE PADS [ses 0x3] [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.732815 PPPoE  [ses 0x3] LCP, Conf-Request (0x01), id 3, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0x4a8dd0a8
19:13:59.776016 PPPoE PADT [ses 0x3] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:13:59.863296 PPPoE PADT [ses 0x3] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.903260 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.903318 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:13:59.903420 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:13:59.903759 PPPoE PADS [ses 0x4] [Service-Name] [Host-Uniq 0xBD120000]
19:13:59.932463 PPPoE  [ses 0x4] LCP, Conf-Request (0x01), id 4, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0xb39f63da
19:13:59.965787 PPPoE PADT [ses 0x4] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:14:00.019370 PPPoE PADT [ses 0x4] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.079395 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.079467 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:14:00.079596 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.079929 PPPoE PADS [ses 0x5] [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.108458 PPPoE  [ses 0x5] LCP, Conf-Request (0x01), id 5, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0x3a28f158
19:14:00.135923 PPPoE PADT [ses 0x5] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:14:00.195406 PPPoE PADT [ses 0x5] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.227469 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.227514 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:14:00.227668 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.228005 PPPoE PADS [ses 0x6] [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.244695 PPPoE  [ses 0x6] LCP, Conf-Request (0x01), id 6, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0x62149f54
19:14:00.285902 PPPoE PADT [ses 0x6] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:14:00.343457 PPPoE PADT [ses 0x6] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.387461 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.387538 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:14:00.387822 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.388153 PPPoE PADS [ses 0x7] [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.408707 PPPoE  [ses 0x7] LCP, Conf-Request (0x01), id 7, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0xa9fd635b
19:14:00.435989 PPPoE PADT [ses 0x7] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:14:00.495350 PPPoE PADT [ses 0x7] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.547455 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.547521 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:14:00.547835 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.548161 PPPoE PADS [ses 0x8] [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.576696 PPPoE  [ses 0x8] LCP, Conf-Request (0x01), id 8, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0x062d7b07
19:14:00.616027 PPPoE PADT [ses 0x8] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:14:00.695386 PPPoE PADT [ses 0x8] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.727389 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.727460 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:14:00.727589 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.727921 PPPoE PADS [ses 0x9] [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.744452 PPPoE  [ses 0x9] LCP, Conf-Request (0x01), id 9, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0x62cf2d22
19:14:00.815806 PPPoE PADT [ses 0x9] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:14:00.867400 PPPoE PADT [ses 0x9] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.907384 PPPoE PADI [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.907455 PPPoE PADO [AC-Name "OpenWrt-AX59U"] [Service-Name] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000] [Host-Uniq 0xBD120000]
19:14:00.907644 PPPoE PADR [Service-Name] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]
19:14:00.907979 PPPoE PADS [ses 0xa] [Service-Name] [Host-Uniq 0xBD120000]
19:14:00.932398 PPPoE  [ses 0xa] LCP, Conf-Request (0x01), id 10, length 16
	encoded length 14 (=Option(s) length 10)
	  MRU Option (0x01), length 4: 1492
	  Magic-Num Option (0x05), length 6: 0xed3fb8e6
19:14:00.985877 PPPoE PADT [ses 0xa] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
19:14:01.039414 PPPoE PADT [ses 0xa] [Host-Uniq 0xBD120000] [AC-Cookie 0x418B2E067A1F92F6ABCF843F6C9C0BAAB10D0000]

Hi mate, I've kinda fixed this PPPOE server thing, it succesfully gives the IP, but clients can't connect to the internet here. So in my example, I've set up another openwrt router between just to be simple, configured kinda like an AP. So, internet comes from LAN1 side, so I want it to go through wan.35 side. How do I do that? There were some iptables script when I used in Debian. But don't know how would they translated to Openwrt here. Can you please help me?

sysctl -w net.ipv4.ip_forward=1

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

In this example, I used a laptop and we get internet from wlan0, then to it's ethernet port. It worked on Debian, how to translate this to openwrt?