OPNsense Forum

English Forums => General Discussion => Topic started by: verytiredstudent on October 28, 2023, 09:32:06 PM

Title: Opnsense box stuck with 0.0.0.0 wan ip
Post by: verytiredstudent on October 28, 2023, 09:32:06 PM
Heres my setup: isp cable line -> arris sb8200 modem -> opnsense box (bare metal) -> tp link sg1008mp switch -> computers, ap, etc.

I cannot for the life of me figure out why my opnsense box cannot get an ip from my modem. Throughout the entire time of me troubleshooting this, I was always capable of plugging another regular computer into it, and getting working internet. Things I tried:


I've attached the packet capture of the wan interface using the setup I described in the beginning of the post (only difference being my laptop is plugged into the back of the modem as well so I have internet to post this with). Admittedly, this a bit of uncharted territory for me here, as I typically deal with things like my lets encrypt ssl certificates not working, not my router straight up not having an ip address and having to analyze individual packets. I looked up what they meant and tried to fix things from there but got nowhere
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: mimugmail on October 28, 2023, 10:35:02 PM
Before 23.1:
Add a manual nat with source 0.0.0.0/32 to nat outbound

After 23.1:
No idea :/
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: franco on October 28, 2023, 11:02:59 PM
This is about address assignment never going past 0.0.0.0, yes?


Cheers,
Franco
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: verytiredstudent on October 28, 2023, 11:09:15 PM
Quote from: franco on October 28, 2023, 11:02:59 PM
This is about address assignment never going past 0.0.0.0, yes?


Cheers,
Franco

Yes, it has never changed from 0.0.0.0 throughout all the things I tried. I believe the only thing that ever changed was getting an ipv6 link local address if I set it to ask for a prefix and not a ipv6 address
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: franco on October 28, 2023, 11:13:18 PM
The problem appears to be that the ISP/upstream router won't or can't reach you for the final phase of the DHCP. Did you have another router here that works? Try to spoof the OPNsense WAN to its MAC address if you can find it.

In any case I'd recommend a packet capture on the WAN to see when the DHCP sequence stops. It might give a clue which side is to blame.


Cheers,
Franco
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: verytiredstudent on October 28, 2023, 11:39:08 PM
I unfortunately do not have any router on-hand aside from the combo my isp gave, which I'm pretty sure they disabled once I had to call in the swap to my own modem. What I can do is take that packet capture. Tell me if I did this wrong, I had opnsense release the dhcp lease on the wan interface, I unplugged the ethernet cable from the back, waited 30 seconds, I started a packet capture on the wan interface in promiscuous mode, I plugged the ethernet cable back in, and I stopped the capture once both dhcpv4 and dhcpv6 were back up (at least according to the wan interface overview anyways). I've attached that packet capture here
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: Maurice on October 28, 2023, 11:52:42 PM
Maybe start from scratch. USB Ethernet, MAC spoofing... That sounds like it could only make it worse. Make sure you have properly supported NICs before going any further.

The packet captures are very weird. Assuming 2c:86:d2:89:10:19 is the CMTS and 00:05:1b:db:54:be is the OPNsense USB WAN NIC:

In the first packet capture, OPNsense isn't sending anything related to DHCPv4, Router Solicitations or DHCPv6. But a bunch of mDNS, LLMNR and even NetBIOS(!) name resolution attempts. That's something you would expect only in a LAN.
The second packet capture doesn't have anything originating from OPNsense.

Multiple devices connected directly to a cable modem isn't supported by many ISPs. Typically, you even have to reboot the cable modem once the device connected to it changes.

Oh, and your ISP sends Router Advertisements, indicating they actually do support IPv6.

Cheers
Maurice

[edit] Don't use promiscuous mode for the packet captures, that's quite possibly not properly supported by your USB NIC. [/edit]
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: verytiredstudent on October 29, 2023, 12:02:44 AM
Quote from: Maurice on October 28, 2023, 11:52:42 PM
Maybe start from scratch. USB Ethernet, MAC spoofing... That sounds like it could only make it worse. Make sure you have properly supported NICs before going any further.

The packet captures are very weird. Assuming 2c:86:d2:89:10:19 is the CMTS and 00:05:1b:db:54:be is the OPNsense USB WAN NIC:

In the first packet capture, OPNsense isn't sending anything related to DHCPv4, Router Solicitations or DHCPv6. But a bunch of mDNS, LLMNR and even NetBIOS(!) name resolution attempts. That's something you would expect only in a LAN.
The second packet capture doesn't have anything originating from OPNsense.

Multiple devices connected directly to a cable modem isn't supported by many ISPs. Typically, you even have to reboot the cable modem once the device connected to it changes.

Oh, and your ISP sends Router Advertisements, indicating they actually do support IPv6.

Cheers
Maurice

I have no clue about the why behind the weird packets, in regards to the lan packets I can try redoing that packet capture after having rebooted the modem and only having the opnsense box connected? A quick google search has people reporting that my isp gives a separate ip for each port, which does go in line with the person I spoke with on the phone encouraging me to test for internet access on my laptop using both ports (granted this was for the combo unit specifically and not the arris sb8200)
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: Maurice on October 29, 2023, 12:07:19 AM
Your ISP may or may not support multiple devices connected to the modem. Try connecting only OPNsense and reboot the modem. Perform a packet capture on the WAN interface without promiscuous mode.
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: verytiredstudent on October 29, 2023, 12:21:45 AM
Quote from: Maurice on October 29, 2023, 12:07:19 AM
Your ISP may or may not support multiple devices connected to the modem. Try connecting only OPNsense and reboot the modem. Perform a packet capture on the WAN interface without promiscuous mode.

Here's the capture
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: Maurice on October 29, 2023, 12:35:42 AM
Not a single frame sent by OPNsense. Something is very off.
I'd really start from scratch with proper NICs. What "very cheap and old" NICs does your device have?
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: verytiredstudent on October 29, 2023, 01:03:38 AM
Quote from: Maurice on October 29, 2023, 12:35:42 AM
Not a single frame sent by OPNsense. Something is very off.
I'd really start from scratch with proper NICs. What "very cheap and old" NICs does your device have?

According to pciconf it is a rlt810xE nic

As a side note, I think I may have been told some false information, I was under the impression this laptop was easily a decade old based off what my parents told me when I bought it off them. I'm pleasantly surprised that this laptop is only 5 ish years old (if the CPU is anything to go by anyways)
Title: Re: Opnsense box stuck with 0.0.0.0 wan ip
Post by: verytiredstudent on October 29, 2023, 07:20:56 AM
A couple things I've tried since: I downloaded the files to make the realtek driver plugin, copied them to my computer and then copied them over ssh to the box. Drivers unfortunately did not change anything.

Now here's the good news: I thought maybe I'd have better luck having proxmox make the DHCP request, it running on linux rather than bsd. And I was right, proxmox can get a DHCP offer from my modem no problem. So it's not the nics being faulty, they work. Now here's the bad news: even though proxmox has a working public IP address, opnsense still reports a 0.0.0.0 IP address for the wan. I might be just passing the network devices to opnsense incorrectly, but I if I'm not I really don't know what else to do