Jump to content

How to make a DHCP server?


Guest Carlos Tarik
 Share

Recommended Posts

Guest Carlos Tarik

Hello everybody,

 

I have a Server with Mandriva 2007 work as a Firewall, I would like that it works as a DHCP server too. I need only a simple DHCP server, to distribute IP and Default gateway. My server is already sharing the Internet BroadBand. My network is 192.168.0.0/24.

 

 

If someone could help me, i apreciate that.

 

 

Thanks.

 

Carlos Tarik

Linux Beginner..rsrs

Link to comment
Share on other sites

Found this in a german article (based on Mdv 2005) and have translated it for you. I guess it will be the same procedure in 2007:

Run from a root terminal:

cp /etc/dhcpd.conf.sample \
/etc/dhcpd.conf

This will activate a sample configuration for a dhcp server. Now edit the dhcpd.conf file with e.g. nano. (The file you get should look similar to this):

option domain-name "home-network";
ddns-update-style none;
default-lease-time 14400;
subnet 192.168.1.0 netmask 255.255.255.0  {
		range 192.168.1.10 192.168.1.20;
		default-lease-time 14400;
		max-lease-time 172800;

}

Adjust the domain name, if necessary, as well as the subnet entry. Most times they can stay as are. Adjust the range setting to the IP range that your server uses in order to communicate with the other computers on your LAN. Now save and exit.

 

Now you will need to have a database containing all used IP addresses. For this, run as root:

touch /var/lib/dhcp/dhcpd.leases

Now open the control center and activate in the services-section the "dhcp" service and check the "start service at bootup" box.

 

Hope it works.

Link to comment
Share on other sites

Easiest way to configure a DHCP server is to use Webmin. Just a few clicks and you're off. If you need a dedicated routing solution, also check out Smoothwall - it's a dedicated distro for this kind of thing.

 

Otherwise go to your nearest computer / electronics shop and pick up a cheap router ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...