4.4 KiB
+++ title = "Homelab - IPv4 Expose" date = 2026-02-23 description = "How I expose my IPv6 only Homelab for IPv4 clients" draft = true
[taxonomies] categories = ["Homelab"] tags = ["Homelab", "IPv4", "IPv6"] +++
Previous Setup
Currently I am renting a VPS which runs a custom proxy, that loads the configuration from consul based on tags and then accepts traffic on the proper ports and forwards it manually.
Plan
Services that need to be exposed get their own virtual IPv6 address using keepalived. The active/master node will be forced to the node on which the service is currently running using priorities.
On my external server setup Jool with SIIT-DC and iptable rules.
- Everything coming in at the given port for the service (for example HTTP, Teamspeak, etc.) is redirected to a different internal IPv4 address using iptables
- Jool listens on the internal IPv4 address and performs SIIT-DC or SIIT-EAM forwarding to the correct virtual IPv6 address
New Setup - Part 1 SIIT-EAM
- Get a server that supports Dual-Stack networking and in the best case a /64 ipv6 subnet (I choose Scaleway as a European cloud provider, with cheap servers) Scaleway IPv6 Docs Scaleway Check neighbor discovery
- apt-get update and apt-get upgrade
- Install Jool
- Based on the jool documentation
sudo apt install jool-dkms jool-tools- Enable IP forwarding
/sbin/sysctl -w net.ipv4.conf.all.forwarding=1/sbin/sysctl -w net.ipv6.conf.all.forwarding=1
- Install NDP Proxy Daemon ndppd
sudo apt-get install ndppd/sbin/sysctl -w net.ipv6.conf.all.proxy_ndp=1
- Configure Jool
/sbin/modprobe jool_siitjool_siit instance add "example" --netfilter --pool6 2001:0bc8:1640:6554:0:0:0:0/96jool_siit -i "example" eamt add 2001:4dd5:b276:1:f652:14ff:fe94:dc00/128 51.158.177.228/32- (Optional for debugging)
jool_siit -i "example" global update logging-debug true
- ndppd for neighbor discovery
- In
/etc/ndppd.confproxy ens2 { rule 2001:0bc8:1640:6554:0:0:0:0/96 { static } }
- In
Troubles
Jool missing pool6, because I first wanted to try with only the EAM entry
Lots of debugging with tcpdump on external and local server
Neighbor Solicitation not working
13:31:35.919212 IP6 _gateway > ff02::1:ff52:2f24: ICMP6, neighbor solicitation, who has 2001:bc8:1640:6554::4a52:2f24, length 32
fixed using ndppd.
Fixed forwarding for everything received on the v4 ip, no way to forward based on service
New Setup - Part 2 NAT64 with static BIB
The idea with this is to basically perform some static NAT64, to map ports on the ipv4 side to specific addresses and ports on the ipv6 side. This would allow me to have one entry for every port that I want to expose, regardless of the IPv6 or port of the service.
Future Work
- Automate the jool setup (ansible playbook or maybe even using cloud-init)
- Automate the configuration of the corresponding entries (likely a custom integration with consul)
References
-
We need to configure the pool4 used by jool using the given pool4 commands ↩︎