I have a VPN server that act as my IPv6 connection to the Internet. The setup us like this:
I have been assigned a /48 address pool, that I want to subnet to my VPN clients. For argument sake lets call the pool 2001:DB8:CAFE::/48
.
I have split that network up into the following parts:
2001:DB8:CAFE::/64
is assigned to the actual VPN link between VPN server and each client.
- `2001:DB8:CAFE:100:/56` is assigned to the network behind Client 1
- `2001:DB8:CAFE:200:/56` is assigned to the network behind Client 2
This gives us this layout:
+--------------+ 2001:470:xxxx:xxx::/64 +---------------+ /-> Client 1 network (2001:DB8:CAFE:100::/56) | + <-- Tunnelbroker link -> + | / | The internet | | My VPN Server + <-*---> VPN link - network topology (2001:DB8:CAFE::/64) | + <- Native IPv6 link ---> + | \ +--------------+ 2a01:xxxx:xxxx:xxxx::/48 +---------------+ \-> Client 2 network (2001:DB8:CAFE:200::/56)
Want I want is that all traffic comming from 2001:DB8:CAFE::/48
is routed over my Tunnelbroker link - and only that link.
This leads me to the following script:
# Reset IPv6 routing table.
ip -6 rule flush
# Reset Tunnelbroker routing table (table name: "he-ipv6").
ip -6 route flush table he-ipv6
# Add routeable VPN subnets to Tunnelbroker routing table
ip -6 rule add from 2001:DB8:CAFE::/48 table he-ipv6
# Any traffic that originates from VPN has to be forwarded via Tunnelbroker routing table
# using the tunnelbroker link (link name: he-ipv6).
ip -6 route add default via 2001:470:xxxx:xxx::1 dev he-ipv6 table he-ipv6
# Add default IPv6 rules again - since they gets deleted by the initial rule flush command.
ip -6 rule add priority 32766 from all table main
However: when I run the ip -6 route add default ...
-command I get the following error back:
RTNETLINK answers: No route to host
The problem is that could ping 2001:470:xxxx:xxx::1
before I ran script, but not after.
What am I missing?