aboutsummaryrefslogtreecommitdiff

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.

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.