blob: 97a8da6178a1b3feff55c20877395185f5b3bbca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# Alpine Linux Home Router
A small set of shell scripts you can drop into `/etc/local.d/`
that will turn an Alpine Linux machine into a home router. The functionality
includes IPv6 via DHCPv6 and port dynamic forwarding via miniupnpd ( optional )
## Configuration
All major configuration options are in `/etc/local.d/vars.sh`
Simply adjust `wan_hwaddr` if yo so desire, set the `wan` and `lan` interfaces
and the scripts will take care of the rest.
The `radvd` daemon will automatically be started by the `dhcpcd` hook.
`dnsmasq` for DHCPv4 on the LAN needs to be enabled by hand.
`miniupnpd` is not enabled by default, though it is configured.
## Installation
On a complete Alpine Linux install, copy the files to `/etc/local.d`,
then run:
```
# apk add iptables ip6tables dnsmasq miniupnpd dhcpcd radvd curl
# rc-update add local boot
# rc-update add dnsmasq default
```
For a basic configuration. Reboot for it to take effect. It's wise to disable
all other network configuration on the box before you do so.
For a more in-depth tutorial [see my blog post](https://riedstra.dev/2022/02/alpine-linux-home-router).
## UPNP Considerations
UPNP can be dangerous, if you don't trust the devices on your network turn it
off, or block the port to all but the devices you trust.
|