Set local static IP for wan interface using PPPoE

Started by alb4rt, June 14, 2023, 01:59:39 AM

Previous topic - Next topic
Hi,

Moving over from EdgeMAX to OPNsense.

My internet connection requires PPPoE to connect, but I also need to set a static local 192.168.2.0/24 static IP on the wan interface in order to be able to access my modem for statistic monitoring.

Is it possible to do this?

Thanks for any help

Yes, you can use IP Alias.
Interfaces->Virtual IPs.

Edit: I don't have PPPOE connection right now but I recall we can't access the modem through PPPOE interface because it is just a virtual interface. You need to assign the physical port of your PPPOE to a new interface and set your static IP there (and NAT it if I remember correctly).

VIPs should work without an issue.


Cheers,
Franco

I just had a look at my config.xml:

I don't assign an IP to WAN, but there is an outbound NAT rule on WAN allowing a specific IP in LAN to accesses the modems IP/32. And that works...
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

@chemlud
Interesting, i have also done this with a virtual ip, but am curious about your solution.
Can you share a screen capture of your nat rule on wan for me to learn and i can test it at my network? thnx!

Deciso DEC850v2

June 14, 2023, 02:31:00 PM #5 Last Edit: June 14, 2023, 02:32:49 PM by chemlud
Have a look, I configured it a few years ago. Works here. The WAN is DHCP. No special interface, as for the dark side of the sense universe. No rules on WAN or LAN besides HTTP any any for the client on LAN (the modem only speaks http)...

Fun fact: "Block private networks" is ticked on WAN... :-D
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

thank for sharing! Something to test in the weekend :-)
Deciso DEC850v2

Hi,

I've the same necessity. My LAN has 192.168.1.0/24 and my opnsense router has 192.168.1.2/32 address.

I need to reach the ONT fiber device connected to WAN port with PPPoE . Its net address is 192.168.1.1.

I tried to use Virtual IP on wan interface but I'm notable to reach the OntFiber .

I can't see a VIP on the WAN interface working for this - the WAN interface is one end of a PPP tunnel. The other end od the PPP tunnel is not on the ONT - it's on some ISP-owned hardware in some location beyond the other end of the fibre. I would expect the ONT to be invisible from the PPP layer.

Assigning the underlying physical NIC and giving it a 192.168.x.x address seems like it should work (see @zan's editted response), but I don't have an easy way to test it. You would have to NAT it if you want to access the ONT from hosts on your LAN, unless there's a way to add static routes to the ONT (pointing back to you LAN through OPNsense).

Quote from: Gianry on September 20, 2024, 10:38:49 PM
Hi,

I've the same necessity. My LAN has 192.168.1.0/24 and my opnsense router has 192.168.1.2/32 address.

I need to reach the ONT fiber device connected to WAN port with PPPoE . Its net address is 192.168.1.1.

I tried to use Virtual IP on wan interface but I'm notable to reach the OntFiber .

I've followed this instructions and it worked for me: https://forum.opnsense.org/index.php?topic=37697.msg184773#msg184773

September 21, 2024, 03:09:41 PM #10 Last Edit: September 21, 2024, 03:25:14 PM by Gianry
I've created an interface of the physical wan port with Static Ip4 address in the same subnet
Than I've created a Gateway
The it is necessary to create a bridge trough LAN and Wan port