This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| docu:tutos:net:rpi_to_router [2020/02/08 13:57] – admin | docu:tutos:net:rpi_to_router [2020/02/09 22:24] (current) – admin | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| - Connect your **usb-to-ethernet** dongle to any free usb slot on your device. | - Connect your **usb-to-ethernet** dongle to any free usb slot on your device. | ||
| - You should see a **new interface** (`ip addr`), our subnet **will be on eth1**. If you don't see the new interface, make sure your **system supports usb-to-ethernet**) | - You should see a **new interface** (`ip addr`), our subnet **will be on eth1**. If you don't see the new interface, make sure your **system supports usb-to-ethernet**) | ||
| + | - Connect a **small ethernet cable** from the usb-to-ethernet to a **switch** (for providing networking to other devices) | ||
| <code txt> | <code txt> | ||
| Line 26: | Line 27: | ||
| </ | </ | ||
| - | I really | + | I also recommend you to **remove** network-manager, |
| \\ | \\ | ||
| Line 115: | Line 116: | ||
| echo 1 > / | echo 1 > / | ||
| </ | </ | ||
| + | |||
| + | To finish the setup, **restart the isc-dhcp-server** | ||
| + | <code bash> | ||
| \\ | \\ | ||
| - | === Setup a DNS Server (Optional, but recommended) === | + | === Setup a DNS Server (Highly |
| We will be using **dnsmasq** as our DNS Server, because it is very easy to install and configure. | We will be using **dnsmasq** as our DNS Server, because it is very easy to install and configure. | ||
| <code bash> | <code bash> | ||
| + | |||
| + | Configure the dns server: | ||
| + | <code bash>vim / | ||
| + | <file bash dnsmasq.conf> | ||
| + | |||
| + | # bind on custom interface or ip | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # log dns queries and dhcp requests | ||
| + | # | ||
| + | #log-dhcp | ||
| + | |||
| + | # expand /etc/hosts hosts to your dns | ||
| + | expand-hosts | ||
| + | |||
| + | # forward dns request to this ip | ||
| + | # when you can't resolve an address | ||
| + | server=1.1.1.1 | ||
| + | # if omitted, dnsmasq will use resolvconf to return | ||
| + | # the dns configuration inherited by the dhcp server | ||
| + | </ | ||
| + | |||
| + | Restart the **dnsmasq** server | ||
| + | <code bash> | ||
| + | |||
| + | \\ | ||
| + | === Connect your server or laptop to the switch you've configured earlier, and wollah! === | ||
| + | ==== Enjoy! ==== | ||