OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: Altanir on December 23, 2022, 01:29:32 pm

Title: PPPoE connection doesn´t work
Post by: Altanir on December 23, 2022, 01:29:32 pm
Hello. I´m trying to set a PPPoE WAN connection but without any success. I´ve seen and followed several youtube tutorials as well as several posts on this forum and can´t make it work.

My ISP provided me a login and password, which works just fine in my tp-link router, as well as in my windows pc creating a pppoe connection. It also works in OpenWRT installed as a VM in the same hardware as the OPNSense.

When setting the OPNSense Wan as DHCP and getting a cable from my tp-link router, I can get an IP and update the OPNSense.

My network:

(https://i.ibb.co/ZTB6cFF/network-diagram.png) (https://ibb.co/ZTB6cFF)

Proxmox network:

(https://i.ibb.co/DCv5BMp/proxmox-ethernet-adapters.png)

Proxmox OPNSense VM

(https://i.ibb.co/SNNNRSL/proxmox-opnsense-vm.png)

OPNSense Settings:

(https://i.ibb.co/0m3fv42/opnsense-dashboard-1.png)
(https://i.ibb.co/SPQ9KhL/opnsense-dashboard-lan-wan.png)
(https://i.ibb.co/t3nwc6G/opnsense-interfaces-assignments.png)
(https://i.ibb.co/27w6rWQ/opnsense-interfaces-settings.png)
(https://i.ibb.co/18v3z04/opnsense-wan-config.png)
(https://i.ibb.co/bRkpVLg/opnsense-interfaces-point-to-point-devices.png)

The login and password are correctly displayed in the /conf/config.xml file, with the password encoded.
The OpenWRT VM has the same settings, same NICS, and works out of the box with just the login and passwords.

Part of the Point to Point Log above:

Code: [Select]
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Req-Sent --> Ack-Rcvd
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xf10477f4
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] LCP: rec'd Configure Ack #104 (Req-Sent)
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xf10477f4
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendConfigReq #104
2022-12-23T09:23:52-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Ack-Rcvd --> Req-Sent
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Req-Sent --> Ack-Rcvd
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xf10477f4
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] LCP: rec'd Configure Ack #103 (Req-Sent)
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xf10477f4
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendConfigReq #103
2022-12-23T09:23:50-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Ack-Rcvd --> Req-Sent
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Req-Sent --> Ack-Rcvd
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xf10477f4
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] LCP: rec'd Configure Ack #102 (Req-Sent)
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xf10477f4
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendConfigReq #102
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] PROTOCOMP
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] LCP: rec'd Configure Reject #101 (Req-Sent)
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xf10477f4
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] PROTOCOMP
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendConfigReq #101
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Starting --> Req-Sent
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] LCP: Up event
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] Link: UP event
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] PPPoE: connection successful
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] rec'd proto LCP while dead
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 PPPoE: rec'd ACNAME "BRAS03NG"
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] PPPoE: Connecting to ''
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] Link: reconnection attempt 292
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] Link: reconnection attempt 292 in 2 seconds
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: LayerStart
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Stopped --> Starting
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: Down event
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] Link: DOWN event
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] PPPoE: connection closed
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: LayerFinish
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Stopping --> Stopped
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: rec'd Terminate Ack #100 (Stopping)
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] rec'd proto CHAP during terminate phase
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: LayerDown
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendTerminateReq #100
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Opened --> Stopping
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: received an invalid magic number
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: magic number is wrong: 0x050643b4 != 0x43b44449
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: LayerUp
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: auth: peer wants CHAP, I want nothing
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Ack-Rcvd --> Opened
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0x43b44449
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] AUTHPROTO CHAP MD5
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendConfigAck #1
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0x43b44449
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] AUTHPROTO CHAP MD5
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: rec'd Configure Request #1 (Ack-Rcvd)
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Req-Sent --> Ack-Rcvd
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xa131fc10
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] LCP: rec'd Configure Ack #99 (Req-Sent)
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xa131fc10
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendConfigReq #99
2022-12-23T09:23:44-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Ack-Rcvd --> Req-Sent
2022-12-23T09:23:42-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Req-Sent --> Ack-Rcvd
2022-12-23T09:23:42-03:00 3 Informational ppp 28636 [wan_link0] MAGICNUM 0xa131fc10
2022-12-23T09:23:42-03:00 3 Informational ppp 28636 [wan_link0] MRU 1492


Please, can anybody help me get this working?
Title: Re: PPPoE connection doesn´t work
Post by: Altanir on December 26, 2022, 01:40:17 pm
Anybody?
Title: Re: PPPoE connection doesn´t work
Post by: RamSense on December 26, 2022, 03:38:06 pm
Not sure if this helps, since i have my opnsense directly conneted to my isp, but for me to get pppoe to work i had to add a vlan (interfaces - other types - vlan) , Device: vlan01, Parent igb0 (my wan NIC) VLAN tag: 6 (needed by my isp)

my point to point - Link interface(s): vlan01

or, why not connect your opnsense box directly to the isp and get it to work, and than work further down?
Title: Re: PPPoE connection doesn´t work
Post by: Altanir on December 26, 2022, 06:29:27 pm
Thanks for the reply.

I've called the ISP and checked with them what was necessary to make a connection and it is just the login and password. No Vlans, service name, etc.

They also told me that despite the OPNSense trying to make a connection, nothing would show on their end. It is as if the cable is unplugged. Maybe there's some firewall rule I need to create or anything like that. But I have no clue.

"or, why not connect your opnsense box directly to the isp and get it to work, and than work further down?"
What do you mean? I thought that is what I'm trying to do... Is there another way?
Title: Re: PPPoE connection doesn´t work
Post by: RamSense on December 26, 2022, 07:08:11 pm
You're attached picture was showing modem (not in my place)-> opnsense box.
I have my opnsense box directly connected, no other modem in front.
In my previous setup and ISP i had also a modem in front of my opnsense box and set that modem into bridge mode. Have you set your modem in bride also? if not, you could have [double NAT] problems, do a google search and see if that is the case, or if there is a way to set your modem into bridge mode.

maybe this is related? https://forum.opnsense.org/index.php?topic=9778.0 (https://forum.opnsense.org/index.php?topic=9778.0)

Maybe more experienced forum members here have other insights here also.
Title: Re: PPPoE connection doesn´t work
Post by: Altanir on December 26, 2022, 07:49:23 pm
Yeah... I assume that it is a modem.  I live in an apartment building and the ISP has it placed somewhere. It is shared to several floors/units and all I get is a RJ45 cable from the wall. I believe it is a modem and it is already in bridge mode, because the ISP originally set up a tp-link router in my place, in PPPoE mode. I later replaced it with another tp-link router, using just the login and password.

There's no way I can bypass it or change any settings, I don't have any access to it.
Title: Re: PPPoE connection doesn´t work
Post by: pouakai on December 26, 2022, 08:47:01 pm
Looking at your log and comparing it with my log for PPPOE, it all seems to go wrong about here:
Code: [Select]
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: LayerDown
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: SendTerminateReq #100
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Opened --> Stopping
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: received an invalid magic number
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: magic number is wrong: 0x050643b4 != 0x43b44449

It seems that the magic numbers are wrong.  I had no idea what magic numbers are, but Google gave me some direction.  They are to check the network is not a loopback (I think).
At this point Opnsense (?) tries to teminate the ppp and tries to do a restart, but the peer seems to want to keep connecting with the old connection:

Code: [Select]
022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] PPPoE: connection successful
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] rec'd proto LCP while dead
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 PPPoE: rec'd ACNAME "BRAS03NG"
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] PPPoE: Connecting to ''
2022-12-23T09:23:48-03:00 3 Informational ppp 28636 [wan_link0] Link: reconnection attempt 292
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] Link: reconnection attempt 292 in 2 seconds
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: LayerStart
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: state change Stopped --> Starting
....

2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] rec'd proto CHAP during terminate phase
2022-12-23T09:23:46-03:00 3 Informational ppp 28636 [wan_link0] LCP: LayerDown

I see the peer trying to start authentication (CHAP) on the first connection attempt while it is closing, but on the second connection attempt, the log doesn't show either side trying to start authentication. 
Title: Re: PPPoE connection doesn´t work
Post by: meiso on August 02, 2023, 10:35:57 pm
I am having the same problem, Did anyone able to solve this problem?
I have 2 connections, My one PPPOE connection is working but one connection is have this problem.