-1

I want to forward incoming connections to any address within an assigned ipv6 /64 subnet on a VPS.

Obviously I can't add a billion individual address to the interface, but perhaps I could use a bogus route with a mangle iptables rule to pretend 1 address is a router for the subnet, then just answer arriving packets instead of forwarding them on? Not sure if that's possible or if there's a cleaner approach.

1 Answers1

0

From your question it seems that you are connected, I guess over ethernet, to a /64 network from your VPS provider. In that case what you ask is not possible. Your upstream router would have to keep a Neighbor Discovery entry for each separate IPv6 address in memory, which will use much more memory than available (1). You can ask your provider to route a static prefix to your machine, but using that many addresses from your server LAN is impossible.


1: It would need at least 16 bytes for the IPv6 address + 8 bytes for the MAC address per entry, which for 2^64 addresses is about 393216 petabyte.