Add some more content
This commit is contained in:
@@ -9,17 +9,26 @@ 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.
|
||||
## Motivation
|
||||
The problem I have is one that a lot of people in the self-hosting community will be familiar with.
|
||||
My ISP does not give me a public IPv4 address, which I could use to expose my self-hosted services to the broader internet.
|
||||
|
||||
## Plan
|
||||
Luckily my ISP provides me with a publicly routable `/48` IPv6 address space.
|
||||
So I natively expose my services to the internet using IPv6 and use the approach outlined below to expose my services for IPv4 users as well.
|
||||
|
||||
## Previous Setup
|
||||
Currently I rent a VPS from DigitalOcean, which then naively forwards any TCP connections to my IPv6 services.
|
||||
For this it periodically loads all services I have registered in Consul and looks for specific tags, which I use to mark services that should be exposed.
|
||||
For each such service, it then starts a TCP-listener on it's public IPv4 address and for all incoming requests connects to the IPv6 service being exposed, forwarding all data in both directions.
|
||||
|
||||
## Idea 1 - The 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.
|
||||
1. 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
|
||||
2. 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
|
||||
## Idea 1 - New Setup - Part 1 SIIT-EAM
|
||||
1. 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](https://www.scaleway.com/en/docs/instances/how-to/use-flexips/#flexible-ipv6)
|
||||
[Scaleway Check neighbor discovery](https://www.scaleway.com/en/docs/dedibox-ipv6/how-to/debug-ipv6/#check-the-neighbor-discovery-protocol-ndp)
|
||||
@@ -48,7 +57,7 @@ On my external server setup Jool with SIIT-DC and iptable rules.
|
||||
}
|
||||
```
|
||||
|
||||
### Troubles
|
||||
### Idea 1 - 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
|
||||
@@ -59,7 +68,7 @@ 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
|
||||
## Idea 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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user