Generating a DHCPRELEASE packet

Started by ngreatorex, August 13, 2024, 03:57:45 PM

Previous topic - Next topic
Hi,

Sometimes I want to get a new IP address from my ISP. In order to do so, I need to send them a DHCPRELEASE packet (as otherwise they just assign me the same address). Is there a way to do this from either the Web GUI or the command line on OPNsense? (I am purely talking about IPv4 here)

Thanks,
Neil Greatorex

On interfaces: overview there is a "reload" button on the right of your WAN interface.

Mileage may vary. You may not get your expected result of a different IP.


Cheers,
Franco

Quote from: franco on August 13, 2024, 04:26:46 PM
On interfaces: overview there is a "reload" button on the right of your WAN interface.

Mileage may vary. You may not get your expected result of a different IP.
I've tried that :). As you perhaps suspected, it doesn't give me a new IP. Digging into it a bit more, it looks like it just kills dhclient, and the FreeBSD dhclient doesn't send a DHCPRELEASE on SIGTERM, or any signal for that matter (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265929).

Does anybody know of another command line tool that would do it? Or any experience replacing the FreeBSD dhclient with the ISC one perhaps?

Not a solution, just a potential workaround: Change (spoof) MAC of WAN interface and reload interface?
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....

Quote from: chemlud on August 13, 2024, 05:11:15 PM
Not a solution, just a potential workaround: Change (spoof) MAC of WAN interface and reload interface?
Thanks! That's actually a great workaround :)