Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: julio on August 11, 2015, 11:46:21 pm

Title: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.2, 5.0)
Post by: julio on August 11, 2015, 11:46:21 pm
open a terminal window and "copy & paste" the following commands (updated: 08.02.2017):

zentyal 4.0/zentyal-dhcp 4.0.1:
Code: [Select]
cd /tmp
wget 'https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_dnkycXlSR2dkN1U' -O DHCP_4.0.1.pm.diff
sudo cp /usr/share/perl5/EBox/DHCP.pm /usr/share/perl5/EBox/DHCP.pm.orig
sudo patch /usr/share/perl5/EBox/DHCP.pm DHCP_4.0.1.pm.diff
sudo service zentyal webadmin restart

zentyal 4.2/zentyal-dhcp 4.2:
Code: [Select]
cd /tmp
wget 'https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_bDV0V25VaVNZaXc' -O DHCP_4.2.pm.diff
sudo cp /usr/share/perl5/EBox/DHCP.pm /usr/share/perl5/EBox/DHCP.pm.orig
sudo patch /usr/share/perl5/EBox/DHCP.pm DHCP_4.2.pm.diff
sudo service zentyal webadmin restart

zentyal 5.0/zentyal-dhcp 5.0:
Code: [Select]
cd /tmp
wget 'https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_Ql9uUkpReENSSXM' -O DHCP_5.0.pm.diff
sudo cp /usr/share/perl5/EBox/DHCP.pm /usr/share/perl5/EBox/DHCP.pm.orig
sudo patch /usr/share/perl5/EBox/DHCP.pm DHCP_5.0.pm.diff
sudo systemctl restart zentyal.webadmin-nginx.service zentyal.webadmin-uwsgi.service

revert back to original:
Code: [Select]
sudo apt-get install --reinstall zentyal-dhcp
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
Post by: kamerom on August 26, 2015, 03:34:21 am
Hi,

First, I saw some of your posts and I like to say, great job!!!

Next, if you can help me I would appreciate: How can I use DHCP with Virtual Interfaces in Zentyal 4.1?!

Apparently it needs to change the file zentyal/main/dhcp/src/EBox/Model/Interfaces.pm to show virtual interfaces.

Some idea?!

Edit: The problem already has mentioned here - https://tracker.zentyal.org/issues/657

Tks!
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
Post by: julio on August 27, 2015, 07:35:54 pm
only to show virtual interfaces not enough,
because the settings file write functions also dropped!
Restore all missing functions is hard work...
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
Post by: kamerom on August 27, 2015, 08:55:22 pm
This is bad!
Unfortunately I need this functionality.

Edit: Any tip on how to manually add a subnet to dhcpd.conf? I tried to add on /stubs/subnet.mas but no success.

Anyway, thank you.
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
Post by: jbahillo on August 28, 2015, 03:07:02 pm
Hello Julio:

I would suggest you to submit this to github repo ;)
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
Post by: Dersch on September 22, 2015, 03:16:50 pm
Thanks Julio! It's working like a charm! :)
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
Post by: Dersch on October 30, 2015, 10:44:08 pm
Also available for 4.2?
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
Post by: julio on November 04, 2015, 10:16:15 am
Also available for 4.2?

please try a new instructions...
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
Post by: tamuin on September 27, 2016, 05:58:31 pm
I did this mod when I had 4.0 running.  I recently upgraded to 4.2 and now I can only see the fixed addresses, the dynamically assigned addresses don't show up anymore.

I have tried reverting back to the original, but that did not fix the problem.

I am guessing that I should have reverted back to the original before I upgraded.

Any ideas/suggestions?

 
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
Post by: julio on September 27, 2016, 06:10:39 pm
please try with reinstall the dhcp module:
Code: [Select]
sudo rm -f /usr/share/perl5/EBox/DHCP.pm.orig
sudo apt-get install --reinstall -y zentyal-dhcp

after reinstall try the howto instructions one more time.
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
Post by: tamuin on September 27, 2016, 08:04:50 pm
Thanks for the prompt reply.

It turns out I had a entry in my dhcpd.leases file that was set to never expire, I manually deleted and restarted dhcp and the problem resolved itself.
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
Post by: z3mrh on December 27, 2016, 03:25:41 am
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
Post by: julio on December 27, 2016, 01:07:46 pm
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.

adapted to 5.0 version, please test it...
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
Post by: Labomba on February 07, 2017, 10:43:07 am
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.

adapted to 5.0 version, please test it...

Thnx Julio,
First of all I appreciate your work and feedback!
I tested the fixed ip sollution in zentyal 5 and they are displayed so that's fine.
Only problem is that the feedback says the computer is not active but in reality it was?
Greetzzz
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
Post by: julio on February 08, 2017, 02:51:44 pm
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.

adapted to 5.0 version, please test it...

Thnx Julio,
First of all I appreciate your work and feedback!
I tested the fixed ip sollution in zentyal 5 and they are displayed so that's fine.
Only problem is that the feedback says the computer is not active but in reality it was?
Greetzzz

modified, please test it...
pls revert back to original first!!
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.2, 5.0)
Post by: compumatter on August 17, 2017, 05:10:07 am
I see this post was read over 1500 times !  I know why.

For version 5.0, this code mentioned above worked instantly.  Thank you. I point this out because I originally copied other code not recognizing the 5.0 separation. 

cd /tmp
wget 'https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_Ql9uUkpReENSSXM' -O DHCP_5.0.pm.diff
sudo cp /usr/share/perl5/EBox/DHCP.pm /usr/share/perl5/EBox/DHCP.pm.orig
sudo patch /usr/share/perl5/EBox/DHCP.pm DHCP_5.0.pm.diff
sudo systemctl restart zentyal.webadmin-nginx.service zentyal.webadmin-uwsgi.service
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.2, 5.0)
Post by: tamuin on November 19, 2019, 04:47:50 pm
Has anyone tried this for Zentyal 6?

***update****

I used the update for 5.0 on 6.1 and it worked!

Please note, that the static addresses that is shows are the fixed ip addresses identified in the DHCP module, so if someone sets a static IP address on their laptop and connects it to your network you will not see it here unless it is one of the static IP addresses identified in the DHCP module.
Title: Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.2, 5.0)
Post by: sandrojo on April 20, 2021, 12:05:09 pm
Link is broken.

https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_Ql9uUkpReENSSXM

Not Found
Error 404

Thanks!

Sandro Oliveira