×

Pivotal Studio's video: Linux Router - Setting up DHCP 1 3 - RHEL 7 CentOS 7

@Linux Router - Setting up DHCP (1/3) - RHEL 7 / CentOS 7
Read: In this video, I show you how to setup a DHCP server on a CentOS 7 Linux Machine. This is the start of having a computer, running CentOS 7, to be your router and gateway to the internet. This is the first video, and we just touch on getting the DHCP rolling. Notes: If you use debian or anything debian based, I cannot help you. Do not ask for help on those distributions. There are other video resources available. Keep in mind, most of what I do here can be done on those distributions anyway. File locations may vary. This tutorial and others at: https://linuxguideandhints.com Prerequisites: -A PC -Two Network cards (One can be built in, and the other can be PCI or PCIe) -Linux You can follow along completely if you use these distributions: --Fedora 20+ --CentOS/RHEL 7 Commands to note: vi -- It's an editor in linux. i for insert, o for a new line, shift+g to go to the end of the file, ESC for command mode. :wq saves your file (zz does too). systemctl restart name --name being the name of the service yum install name ---name being the name of the package systemctl enable/disable -- disables or enables services Files/Folders to note: /etc/dhcp/dhcpd.conf /etc/sysconfig/network-scripts/ifcfg-* IP Scheme format: 10, 172, 192 are private IP's. Use them. Trust me. Interface notes... ens192 is the modem ens224 is the network Dropping pings: -A INPUT -i enp3s0 -p icmp -m icmp --icmp-type 8 -j DROP Other notes: To make sure it works, you may want to isolate your linux box from the network, hook up a cross-over cable between a laptop and your linux box and see if you can get an IP. This is the best way, in my opinion, to make sure DHCP is working properly. ** RHEL 7/CentOS 7 names their network interfaces based on the hardware. This can be changed using biosdevname=0 and net.ifnames=0 on the kernel line at install time. You can also use this when the system is up and ready. You are free to rename the interfaces using udev rules. FAQ: 1. I know my syntax is correct, I have no mistakes, but I cannot get DHCPD to start. It always fails! A. You may have to start all the way over. However, you may want to check for missing semicolons. Typically systemctl status dhcpd -l will tell you what's going on. 2. My computers are not getting IP's set up from my box, what do I do? A. Make sure your stock router is not issuing its own DHCP. The best way to do this, is to log into your router (usually 192.168.0.1). Admin being the username and password being the password by default. Some are admin/admin. Read your documentation for more details. You may ALSO want to give the router an IP address so you can still access it later... it needs to match the scheme you setup. Example of my scheme: 10.100.2.20 :: It's outside my 100-254 range, so it's easy for me to remember. 3. I can ping my own IP given to me from my provider, so this means I'm not secured? A. No, just because you can ping yourself, doesn't mean you're not secure. You're just pinging that modem, pretty much, if you want to think of it that way. 4. Will you ever make a written tutorial for this? I enjoy the visual and explanations, but a written tutorial would be nice too. A. Yes, there is one available at the top of the description.

183

0
Pivotal Studio
Subscribers
1.9K
Total Post
3
Total Views
153.6K
Avg. Views
9K
View Profile
This video was published on 2014-07-20 08:01:40 GMT by @Pivotal-Studio on Youtube. Pivotal Studio has total 1.9K subscribers on Youtube and has a total of 3 video.This video has received 183 Likes which are higher than the average likes that Pivotal Studio gets . @Pivotal-Studio receives an average views of 9K per video on Youtube.This video has received 0 comments which are lower than the average comments that Pivotal Studio gets . Overall the views for this video was lower than the average for the profile.

Other post by @Pivotal Studio