Differences
This shows you the differences between two versions of the page.
— |
blocks:server:advanced_server_configuration:dhcp_dns_server [2024-10-08 09:08] (current) admin created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | =====DPCP and DNS server===== | ||
+ | Your linux based Blocks server comes with software letting it can act as a DHCP and/or DNS server for your local network. A DHCP server provides automatic addressing to PIXILAB Player and other network devices set to use automatic addressing. The DNS allows for local name resolution, such as resolving the doman name pixi.guide to the IP address of your server. Using service names rather than raw IP addresses makes it easier to change addressing in the future and is also required for some advanced functions, such as encrypted connections ([[blocks: | ||
+ | :!: IMPORTANT: In general, is a bad idea to have more than one DHCP server on a LAN. f you're connecting Blocks to an already existing network, check with the network administrator before enabling these services on your Blocks server. | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | |||
+ | The //dnsmasq// system service comes bundled with our Linux-based server. Like all other optional services it is disabled by default. Before enabling it you must configure it as desired. This can be done either using the webmin graphical user interface or directly in the terminal. in either case, the configuration file is located at / | ||
+ | |||
+ | To edit the configuration using webmin, first make sure that [[blocks: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Select the "DHCP and DNS configuration (DNSMASQ)" | ||
+ | |||
+ | < | ||
+ | # PIXILAB Blocks server dnsmasq config | ||
+ | |||
+ | ################################################# | ||
+ | # DNS Configuration | ||
+ | |||
+ | # Resolve domain name pixi.guide to specified IP address | ||
+ | address=/ | ||
+ | |||
+ | # Upstreams dns servers, can be inherited from system nework config | ||
+ | # by specifying ' | ||
+ | # desired upstream DNS server IP address | ||
+ | resolv-file=/ | ||
+ | # | ||
+ | |||
+ | ################################################# | ||
+ | # DHCP configuration | ||
+ | |||
+ | # Listen for requests on this network interface | ||
+ | interface=eno1 | ||
+ | |||
+ | # DHCP pool range and lease time | ||
+ | dhcp-range=10.2.5.1, | ||
+ | |||
+ | # Additional Settings and " | ||
+ | dhcp-option=option: | ||
+ | dhcp-option=option: | ||
+ | dhcp-option=option: | ||
+ | # | ||
+ | |||
+ | # Persist leases to this file. This strives to give the same address to a device after reboot | ||
+ | dhcp-leasefile=/ | ||
+ | |||
+ | # Make this dhcp server authoritive (the only dhcp server exixting on the LAN) | ||
+ | dhcp-authoritative | ||
+ | |||
+ | # Add static leases below, assigning specified DHCP clients' | ||
+ | # addresses to fixed IP addresses within the DHCP pool range | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | The example above shows some default settings suitable for a stand-alone Blocks system. Lines beginning with a hash sign (#) are comments or commented-out settings, ignored by the dnsmasq program. Edit relevant entries as required: | ||
+ | |||
+ | * **address=/ | ||
+ | * **interface=eno1** specifies which network interface to bind the DHCP/DNS service to. Verify that the name specified here matches the correct network interface on your server using the **ip a* command like command to list all interfaces. | ||
+ | * **dhcp-range=10.2.5.1, | ||
+ | * **dhcp-option=option.** The netmask dns-server and router options are passed on to DHCP clients to set these values automatically. The netmask and dns-server options must match your server' | ||
+ | |||
+ | Other settings may be [[https:// | ||
+ | |||
+ | Click the "Save and close" at the bottom of the page once you're done. The select "Test DNSMASQ configuration" | ||
+ | |||
+ | |||
+ | ==== Starting ==== | ||
+ | |||
+ | To use the DHCP/DNS server with your configuration, | ||
+ | |||
+ | - In Webmin, select System / Bootup and Shutdown in the main menu on the left hand side. | ||
+ | - Click the small funnel icon in the rop right hand corner and type //dnsmasq// to filter the list. | ||
+ | - Click the checkbox next to dnsmasq-service. | ||
+ | - If the server was already running (as indicated by a " | ||
+ | - If not running, click "Start Now and on Boot" instead. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Connect a network switch to your Blocks server and connect another computer (e.g. a Mac or Windows laptop) to that same switch. Make sure the switch is not connected to your office network, thus forming a small stand-alone network of only your Blocks server and the laptop. Assuming that the laptop is set to configure its network automatically, |