License

Copyright (C) 2008-2021 Oliver Bohlen.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

A copy of the license is included in the section entitled "GNU Free Documentation License".

Introduction

This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

Howto: Internet IPv6 Router for Gentoo Linux

Hosts in LAN will be (firewalled) Internet availabe through IPv6 and can directly connect to other IPv6-Hosts in the Internet!

Global IPv6 Addresses are splitted in multiple Subnets per selected Interface.

If you want to use this solution you need the following howto(s) finished:

Required software

The required software has to be installed with the following command(s):
emerge net-misc/dhcpcd
emerge net-misc/radvd

Changes in /etc/dhcpcd.conf

File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--

Click here for a download of the complete file: /etc/dhcpcd.conf

Changed on 18.08.21
Issued by olli
Beginning line 1

dhcpcd will allocate a /64 prefix from ISP to specified Interfaces in the router from the delegated prefix - except the WAN interface.


# Debug Logging to rsyslog
debug
# DHCP UID as identifier
duid
# disable routing solicitation
noipv6rs
# Wait for an ipv6 ip
waitip 6
# Only configure IPv6
ipv6only
# Do not overwrite resolv.conf or wpa_supplicant
nohook resolv.conf, wpa_supplicant
# Subsequent options are only parsed for ppp0
interface ppp0
  # enable routing solicitation fpr ppp0
  ipv6rs
  # Set the Interface Association Identifier (Interface ID) of ppp0 to 1
  iaid 1
  # Request a DHCPv6 Delegated Prefix (IPv6 Prefix) from ppp0 (ID 1) for eth0 and wlan0
  # so eth0 and wlan0 receive their own from/in the Internet available/routed IPv6-Subnet
  ia_pd 1 eth0
  ia_pd 1 wlan0

Changes in /etc/radvd.conf

File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--

Click here for a download of the complete file: /etc/radvd.conf

Changed on 18.08.21
Issued by olli
Beginning line 1

radvd allocates IPv6 addresses to the clients connected to the specified interfaces. ::/64 prefix for ISP and fd??::/64 prefix for ULA (Unique local addresses).

interface eth0
{
        AdvSendAdvert on;
	AdvLinkMTU 1280;
	MinRtrAdvInterval 3;
        MaxRtrAdvInterval 300;
        prefix ::/64 {
                AdvOnLink on;
                AdvAutonomous on;
        };
	prefix fd23::/64 {
	        AdvOnLink on;
                AdvAutonomous on;
	};
};

interface wlan0
{
        AdvSendAdvert on;
        AdvLinkMTU 1280;
        MinRtrAdvInterval 3;
        MaxRtrAdvInterval 10;
        prefix ::/64 {
                AdvOnLink on;
                AdvAutonomous on;
        };
	prefix fd25::/64 {
                AdvOnLink on;
                AdvAutonomous on;
        };
};

Changes in /etc/sysctl.d/gabosh.conf

File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--

Click here for a download of the complete file: /etc/sysctl.d/gabosh.conf

Changed on 18.08.21
Issued by olli
Beginning line 21

Enable/Disable IPv6 on specific Interfaces

net.ipv6.conf.eth0.disable_ipv6=0
net.ipv6.conf.eth1.disable_ipv6=1
net.ipv6.conf.wlan0.disable_ipv6=0
net.ipv6.conf.vnet0.disable_ipv6=1
net.ipv6.conf.docker0.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=0
net.ipv6.conf.lo.disable_ipv6=0

Changed on 18.08.21
Issued by olli
Beginning line 32

Get IPv6 from ISP

net.ipv6.conf.ppp0.disable_ipv6=0
net.ipv6.conf.ppp0.autoconf=1
net.ipv6.conf.ppp0.accept_ra=2
net.ipv6.conf.all.forwarding=1

Setting up services

For starting the new service after system reboot you should add it to a runlevel with the following command(s):

rc-update add dhcpcd default
rc-update add radvd default

Please send a feedback to: doc<at>gabosh.net

Howto listing
File Index

Here you can find the official Gentoo Linux Forums where you can find a lot of answers.

Here a link to the official Gentoo Linux Homepage.

Edit Howto

About / Impressum

Click here for About / Impressum

Wishlist

If you want to support my work you can find my Amazon whishlist here