{"id":216,"date":"2023-03-06T13:23:49","date_gmt":"2023-03-06T19:23:49","guid":{"rendered":"https:\/\/tekweis.com\/?p=216"},"modified":"2023-03-10T10:26:52","modified_gmt":"2023-03-10T16:26:52","slug":"install-a-dhcp-server","status":"publish","type":"post","link":"https:\/\/tekweis.com\/index.php\/2023\/03\/06\/install-a-dhcp-server\/","title":{"rendered":"Install a DHCP Server"},"content":{"rendered":"\n<p>There are times when you need to run your own DHCP server. For me, this was needed to add to my laptop so I can program IP security cameras with my USB Ethernet adapter attached. The software that typically comes with security cameras is total crap with a bad Chinese translation layered on top and is usually for Windows only. It is just easier to connect the cameras to a DHCP network and login than use some clunky badly written Windows-based application. Here is how I installed and configured a DHCP server for my laptop.<\/p>\n\n\n\n<p>Open a shell prompt and execute the command: <strong>sudo apt install isc-dhcp-server<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"425\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/aptinstall-1024x425.png\" alt=\"\" class=\"wp-image-217\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/aptinstall-1024x425.png 1024w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/aptinstall-300x125.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/aptinstall-768x319.png 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/aptinstall-660x274.png 660w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/aptinstall.png 1218w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>sudo apt install isc-dhcp-server.<\/figcaption><\/figure>\n\n\n\n<p>Now, I run <strong>ip a <\/strong>to list all the network adapters and names. I found my USB adapter easily.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"352\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-ipa-1024x352.png\" alt=\"\" class=\"wp-image-218\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-ipa-1024x352.png 1024w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-ipa-300x103.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-ipa-768x264.png 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-ipa-660x227.png 660w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-ipa.png 1450w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Use, &#8220;ip a&#8221;, to list the network adapters and info.<\/figcaption><\/figure>\n\n\n\n<p>Open the <strong>\/etc\/default\/isc-dhcp-server<\/strong> config file and add the interface name of the USB adapter. This defines the network adapter that will be dishing out DHCP IP addresses.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"631\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/default-dhcp-config.png\" alt=\"\" class=\"wp-image-219\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/default-dhcp-config.png 980w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/default-dhcp-config-300x193.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/default-dhcp-config-768x494.png 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/default-dhcp-config-660x425.png 660w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><figcaption>\/etc\/default\/isc-dhcp-server config file.<\/figcaption><\/figure>\n\n\n\n<p>Now we set an IP range for the DHCP server. I usually keep this really small between 10 and 20 IP addresses for convenience. I usually set the starting IP address one octet higher than the IP I set on the USB adapter. Below, you can see I entered, &#8220;192.168.10.1&#8221; as the IP address of my USB network adapter, then the DHCP range I set at .2 through .10. Set the subnet mask and since this does not need DNS, I just enter a bogus address of the laptop for domain-name-servers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"635\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-config-range.png\" alt=\"\" class=\"wp-image-220\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-config-range.png 979w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-config-range-300x195.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-config-range-768x498.png 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/dhcp-config-range-660x428.png 660w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><figcaption>Set the network adapter info and IP range here.<\/figcaption><\/figure>\n\n\n\n<p>Restart the DHCP server service.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"148\" data-id=\"221\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/RestartService.png\" alt=\"\" class=\"wp-image-221\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/RestartService.png 725w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/RestartService-300x61.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/RestartService-660x135.png 660w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><figcaption>sudo systemctl start isc-dhcp-server<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p>Now I connect the IP POE camera to an injector which then connects to my USB adapter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/LaptopInjectorAdapter-1024x768.jpg\" alt=\"\" class=\"wp-image-225\" width=\"840\" height=\"630\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/LaptopInjectorAdapter-1024x768.jpg 1024w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/LaptopInjectorAdapter-300x225.jpg 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/LaptopInjectorAdapter-768x576.jpg 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/LaptopInjectorAdapter-1536x1152.jpg 1536w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/LaptopInjectorAdapter-2048x1536.jpg 2048w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/LaptopInjectorAdapter-660x495.jpg 660w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><figcaption>Laptop with USB network adapter, POE injector, and camera connected.<\/figcaption><\/figure>\n\n\n\n<p>I use Angry IP Scanner to search and find the camera.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"762\" height=\"505\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/DHCP-AngryIP.png\" alt=\"\" class=\"wp-image-222\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/DHCP-AngryIP.png 762w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/DHCP-AngryIP-300x199.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/DHCP-AngryIP-660x437.png 660w\" sizes=\"auto, (max-width: 762px) 100vw, 762px\" \/><figcaption>Enter the IP range in Angry IP and tell it to scan. <\/figcaption><\/figure>\n\n\n\n<p>I now navigate to the IP address found and am able to sign in and configure the IP camera.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"834\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Responding-1024x834.png\" alt=\"\" class=\"wp-image-223\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Responding-1024x834.png 1024w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Responding-300x244.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Responding-768x625.png 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Responding-660x537.png 660w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Responding.png 1065w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Camera responding at IP addressed issued from the DHCP server.<\/figcaption><\/figure>\n\n\n\n<p>After configuration, live image working.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"780\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Live-Image-1024x780.png\" alt=\"\" class=\"wp-image-224\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Live-Image-1024x780.png 1024w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Live-Image-300x228.png 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Live-Image-768x585.png 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Live-Image-660x503.png 660w, https:\/\/tekweis.com\/wp-content\/uploads\/2023\/03\/Camera-Web-Live-Image.png 1065w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Successfully configured camera.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>There are times when you need to run your own DHCP server. For me, this was needed to add to my laptop so I can program IP security cameras with my USB Ethernet adapter attached. The software that typically comes with security cameras is total crap with a bad Chinese translation layered on top and\u2026 <span class=\"read-more\"><a href=\"https:\/\/tekweis.com\/index.php\/2023\/03\/06\/install-a-dhcp-server\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":1,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":226,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts\/216\/revisions\/226"}],"wp:attachment":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}