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

Prevent IPv6 address being exposed when connected to IPv4 only OpenVPN

· 52CE 我爱测

I have a OpenVPN server which has IPv4 only. I have a OpenVPN client which has IPv6 and IPv4. While connected to the VPN the client is exposed to "IPv6 leak". When client visits IPv6 enabled web sites, the Internet traffic does n…

问题原文

原帖链接 · user2489483 · CC BY-SA 3.0

I have a OpenVPN server which has IPv4 only. I have a OpenVPN client which has IPv6 and IPv4.

While connected to the VPN the client is exposed to "IPv6 leak". When client visits IPv6 enabled web sites, the Internet traffic does not go through the VPN tunnel and his real IP address is exposed to the IPv6 web site in question.

How can I push parameters via the OpenVPN server that will either shut down/block IPv6 traffic, or will route it to no where so that his Internet will failover to IPv4, with the goal to stop IPv6 leak while connected to IPv4 only VPN server.

Note: I know how to block IPv6 traffic manually in Windows and Mac there are many articles about that. I want to achieve that via the OpenVPN server config, or via the OpenVPN client config if the first is not possible.

(You can test if you have IPv6 leak at ipv6leak dot com)

Thank you

已采纳解答

原帖链接 · womble · CC BY-SA 3.0

Whilst the most correct answer is Michael Hampton's comment that you should get IPv6 to your OpenVPN server, you could instead cause the OpenVPN server to push a route for 2000::/3, and then reject any IPv6 traffic that arrives. You may need to twiddle what sort of rejection you send back to cause the client to fallback to IPv4 rather than just saying "lolidunno" and giving up, but it'll give a better user experience than just dropping all the IPv6 traffic on the floor (unless your clients all implement Happy Eyeballs, in which case, reach for the DROP).

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

资料来源与适用范围

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

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

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