文章介绍:使用 VyOS Stream 版本部署 AnyLink SSLVPN,使用动态 DDNS 技术配合 IPv6 实现客户端拨号,然后访问内网 IPv4 资源。

一、VyOS

1.1、VyOS镜像

官方下载 博主共享盘

1.2、VyOS安装

【Vyos-开源篇-1】- VMware安装VyOS虚拟机

1.3、VyOS配置

【VyOS-开源篇-32】- 家庭软路由 VyOS 完整配置

1.4、本期IPv6相关配置

1.4.1、光猫开启RA

yydy_2025-07-19_18-09-28

1.4.2、VyOS配置DHCPv6获取IPv6

set interfaces ethernet eth0 address '10.97.97.6/24'
set interfaces ethernet eth0 address 'dhcpv6'
set interfaces ethernet eth0 dhcpv6-options pd 0 interface eth0 address '1'
set interfaces ethernet eth0 dhcpv6-options pd 0 interface eth0 sla-id '0'
set interfaces ethernet eth0 dhcpv6-options pd 0 length '64'
set interfaces ethernet eth0 ipv6 address autoconf

1.4.3、VyOS配置CloudFlare DDNS

set service dns dynamic name DDNS-CF-v6 address interface 'eth0'
set service dns dynamic name DDNS-CF-v6 host-name '二级域名'
set service dns dynamic name DDNS-CF-v6 ip-version 'ipv6'
set service dns dynamic name DDNS-CF-v6 password 'DNS的API token'
set service dns dynamic name DDNS-CF-v6 protocol 'cloudflare'
set service dns dynamic name DDNS-CF-v6 zone '主域名'

1.4.4、SNAT配置

将AnyLink的虚拟IP转换成eth0口地址上网

set nat source rule 100 outbound-interface name 'eth0'
set nat source rule 100 source address 192.168.90.0/24
set nat source rule 100 translation address 'masquerade'

1.4.5、VyOS 结果截图

yydy_2025-07-19_18-16-08

二、AnyLink

【Vyos-开源篇-21】- VyOS 部署 AnyLink SSLVPN 多种网络模式详解

三、拨号测试

yydy_2025-07-19_18-19-02

yydy_2025-07-19_18-28-27

Image 1 Image 2 Image 3