OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: ngreatorex on August 13, 2024, 03:57:45 PM

Title: Generating a DHCPRELEASE packet
Post by: ngreatorex on August 13, 2024, 03:57:45 PM
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
Title: Re: Generating a DHCPRELEASE packet
Post by: 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.


Cheers,
Franco
Title: Re: Generating a DHCPRELEASE packet
Post by: ngreatorex on August 13, 2024, 05:02:35 PM
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?
Title: Re: Generating a DHCPRELEASE packet
Post by: 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?
Title: Re: Generating a DHCPRELEASE packet
Post by: ngreatorex on August 13, 2024, 06:14:17 PM
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 :)