\n# DHCP server active for WLAN interface\ninterface = wlan0\n\n\n# DHCP server not active for existing network\nno-dhcp-interface = eth0\n\n\n# IPv4 address range and lease time\ndhcp-range = 192.168.1.100,192.168.1.150,24h\n\n\n# DNS\ndhcp-option = option: dns-server 192.168.1.1\n<\/pre><\/div>\n\n\nHere the DHCP server and the DNS forwarding for the network interface “wlan0” is activated and for the interface “eth0” only DNS, but no DHCP is served. In addition, it is specified that in the WLAN, the IPv4 addresses are assigned from 192.168.1.100 to 192.168.1.150 for the clients and the address of the DNS server is specified.<\/p>\n\n\n\n
Test configuration<\/strong> Before commissioning, it is recommended to test the configuration.<\/p>\n\n\n\ndnsmasq --test -C \/etc\/dnsmasq.conf\n<\/pre><\/div>\n\n\nThe syntax check should succeed with “OK”.<\/p>\n\n\n\n
Enable DNSMASQ<\/strong> Restart DNSMASQ:<\/p>\n\n\n\nsudo systemctl restart dnsmasq\n<\/pre><\/div>\n\n\nShow DNSMASQ status:<\/p>\n\n\n
\nsudo systemctl status dnsmasq\n<\/pre><\/div>\n\n\nStart DNSMASQ at system startup:<\/strong><\/p>\n\n\n\nsudo systemctl enable dnsmasq\n<\/pre><\/div>\n\n\nTroubleshooting<\/strong> If it is not quite clear if and how “dnsmasq” distributes the IPv4 addresses, you can show the clients’ communication with the DHCP server:<\/p>\n\n\n\nsudo dnsmasq -dd -C \/etc\/dnsmasq.conf\n<\/pre><\/div>\n\n\nYou can see the lease file here:<\/p>\n\n\n
\ncat \/var\/lib\/misc\/dnsmasq.leases\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"Setup Raspberry Pi DNSMASQ as a DHCP server “dnsmasq” refers to itself as “A lightweight DHCP and caching DNS server”. “Dnsmasq” is a very versatile daemon. In addition to being a DHCP server, it can also be used to provide DNS services (DNS forwarders) and IPv6 router advertisements.Preparing to operate a DHCP server<\/p>\n","protected":false},"author":2,"featured_media":3239,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_meta":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[172],"yoast_head":"\n
Setup DNSMASQ as a DHCP server - KaliTut<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n