大网数据广告活动
服务器运维问答

IPv6 network for WireGuard VPN

· 52CE 我爱测

I am currently migrating a company-internal VPN from OpenVPN to WireGuard. While at it, I want to migrate it from IPv4 to IPv6. The infrastructure currently consists of one server and ~1200 clients behind DSL connections of sever…

问题原文

原帖链接 · Richard Neumann · CC BY-SA 4.0

I am currently migrating a company-internal VPN from OpenVPN to WireGuard. While at it, I want to migrate it from IPv4 to IPv6. The infrastructure currently consists of one server and ~1200 clients behind DSL connections of several ISPs (customer-dependent). The amount is expected to grow and the network will be clustered at some point. I have read about ULAs and SLAAC, but I am not sure how to pick an IPv6 network that is unlikely to collide with existing IPv6 networks of the respective ISPs or with the networks of our customers. What is the recommended way to select an IPv6 network for such a VPN scenario?

已采纳解答

原帖链接 · John Mahowald · CC BY-SA 4.0

Get an IPv6 allocation from your ISP or RIR.

Define an address plan to cover the number of /64s you need, as far forward as you can project. The smallest you should ask for is a /48, a typical size given to one "site". Plan out all your needs, external services, VPNs, LAN, and test networks, across multiple sites if you plan to grow.

Your prefix is to with as you wish, as your ISP routes it to you. If you want to use a few /64s for VPNs, route those to the VPN server.


Unique local address is not for internet access. While ULA can be useful for LAN only resources and labs, you really want a globally routable prefix.

Generate a ULA /48 with "fd" plus 40 random bits. This is extremely likely to be unique with any other networks you may encounter. One easy way: install subnetcalc (it has a Debian package) and

subnetcalc fd00:: 48 -uniquelocal

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-05-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。