前言

不管是梅林还是openwrt固件

都是有IPv6防火墙的

如果只是让特定的设备被外网访问

就需要在路由器防火墙允许特定的IP与端口

这就需要固定的IPv6的后缀

但Windows后缀默认是随机的

所以就需要通过几行命令来固定IPv6后缀

一、Windows通过EUI-64固定IPv6后缀

1.Windows

首先打开终端,查看IPv6是否固定

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Get-NetIPv6Protocol
输出>
DefaultHopLimit : 128
NeighborCacheLimit(Entries) : 256
RouteCacheLimit(Entries) : 4096
ReassemblyLimit(Bytes) : 266907040
IcmpRedirects : Enabled
SourceRoutingBehavior : DontForward
DhcpMediaSense : Enabled
MediaSenseEventLog : Disabled
MldLevel : All
MldVersion : Version2
MulticastForwarding : Disabled
GroupForwardedFragments : Disabled
RandomizeIdentifiers : Enabled # 如果状态为Enabled,则是随机
AddressMaskReply : Disabled
UseTemporaryAddresses : Enabled # 这个是临时地址,不建议修改
MaxTemporaryDadAttempts : 3
MaxTemporaryValidLifetime : 7.00:00:00
MaxTemporaryPreferredLifetime : 1.00:00:00
TemporaryRegenerateTime : 00:00:05
MaxTemporaryDesyncTime : 00:10:00
DeadGatewayDetection : Enabled

将RandomizeIdentifiers"随机化标识符"关闭

1
2
3
4
5
6
Set-NetIPv6Protocol -RandomizeIdentifiers Disabled 
如果出现红字Set-NetIPv6Protocol : 拒绝访问
请打开终端管理员,而不是终端.(Windows10是以管理员运行终端)
Get-NetIPv6Protocol
重新输出> 可以看到已关闭RandomizeIdentifiers
RandomizeIdentifiers : Disabled