Forums

Joe1
Joe1
Offline
Resolved
0 votes
After years of using Clearos 5.x with the DHCP server set to provide leases for unlimited time, I have run out of IP addresses.

How can I manually release specific IP addresses?

I do not want to set the lese time very low.

Thanks,

Joe
Saturday, August 13 2016, 12:11 AM
Share this post:
Responses (5)
  • Accepted Answer

    Monday, August 15 2016, 05:23 PM - #Permalink
    Resolved
    0 votes
    I realise that it is about version 5.x. I don't know if that is possible via the webconfig. It's a long time ago that I used version 5.x.

    Why don't you want short lease times? This way the leases disappear naturally.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, August 15 2016, 04:25 PM - #Permalink
    Resolved
    0 votes
    Joe1 wrote:

    I set the lease time to 4 weeks but that did not release any addresses yet, so I edited the file that you mentioned and that did it for me..


    The path on ClearOS 5 was actually. /var/misc/dnsmasq.leases.

    Thanks,

    Joe

    Nick Howitt wrote:

    Leases are held in /var/lib/dnsmasq/dnsmasq.leases. You may need to stop dnsmasq before you edit the file.

    [edit]
    From the webconfig you can set the lease time to 4 weeks (in 6.x. I don't know about 5.x). If this is not enough, you can manually edit /etc/dnsmasq.d/dhcp.conf.
    [/edit]
    Sorry about the paths. I don't use 5.x any more.

    I don't think changing the changing the lease time will have any effect on existing leases. The first parameter in the leases file is the expiry date/time in Unix epoch format and this will already have been written to file. Setting the lease time will only affect new or renewing leases.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, August 15 2016, 02:06 PM - #Permalink
    Resolved
    0 votes
    Not sure if you did see that you can set the lease times longer as 4 weeks. Unlimited is also possible.

    Go to Infrastructure --> DHCP --> Subnets --> Edit the subnet of your LAN. There you can edit/set the lease time.
    The reply is currently minimized Show
  • Accepted Answer

    Joe1
    Joe1
    Offline
    Monday, August 15 2016, 12:55 PM - #Permalink
    Resolved
    0 votes
    I set the lease time to 4 weeks but that did not release any addresses yet, so I edited the file that you mentioned and that did it for me..


    The path on ClearOS 5 was actually. /var/misc/dnsmasq.leases.

    Thanks,

    Joe

    Nick Howitt wrote:

    Leases are held in /var/lib/dnsmasq/dnsmasq.leases. You may need to stop dnsmasq before you edit the file.

    [edit]
    From the webconfig you can set the lease time to 4 weeks (in 6.x. I don't know about 5.x). If this is not enough, you can manually edit /etc/dnsmasq.d/dhcp.conf.
    [/edit]
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, August 13 2016, 08:08 AM - #Permalink
    Resolved
    0 votes
    Leases are held in /var/lib/dnsmasq/dnsmasq.leases. You may need to stop dnsmasq before you edit the file.

    [edit]
    From the webconfig you can set the lease time to 4 weeks (in 6.x. I don't know about 5.x). If this is not enough, you can manually edit /etc/dnsmasq.d/dhcp.conf.
    [/edit]
    The reply is currently minimized Show
Your Reply