Debian – Dual stack linux router, can’t forward IPv6 prefix

debiandhcpipv6router

I have a small offic here with a few workstations and I would like to implement a small server for stuff like a proxy server, samba etc.
This is the topology of said network:

+-----+   dynamic    +--------+        +-------------------+                 +--+workstation1
|     |  /56 prefix  |        |        |   Debian server   |        +--------+
| ISP +--------------+ Router +-+eth0+-+                   +-+eth1+-+ switch +--+workstation2
|     |   dynamic    |        |        | (squid,dhcp,etc.) |        +--------+
+-----+ IPv4 address +--------+        +-------------------+                 +--+workstationX

I would like to have the server assign global (maybe local as well) IPv6 addresses and private IPv4 addresses to all devices connected to eth1 via the switch. I have been able to get NAT masquerading working with dnsmasq and iptables but I can't get IPv6 traffic or even distributing IPv6 addresses to work. The router has three different settings in the IPv6 DHCP server tab:

  • assign DNS server only
  • assign DNS server and IPv6 prefix to downstream routers (what I assume should be enabled)
  • assign DNS server, IPv6 prefix to downstream routers and IPv6 address

I tried following this guide. It describes how to set up a DHCPv6 server with dnsmasq. I have a working eth0 which gets a global, unique local and a link local address. But my eth1 interface never gets a global IPv6 address, only a link-local one. The devices behind the server all have a working IPv4 address but I can't set the IP to a static one because the prefix is dynamic and changes every night. Currently I'm stuck at this point.

Here are my configuration files.

Thank you for your help.

Best Answer

You will need to assign an IPv6 address to eth1 as it won't be able to autoconfigure. Pick an /64 address from your /56 although you may be able to use your /56. I've used the prefix 2001:0db8:a1b2:c2d3::/64 in the example below.

# This is an IPv6 interface
iface eth1 inet6 static
    address  2001:0db8:a1b2:c2d3::1
    netmask  64
Related Topic