活动:一次性充值满500元,云服务器、虚拟主机产品8折特惠! 全国免费咨询热线:℡ 400-9918-136
帮助和公告

感谢您的关注,我们一直致力于为您提供放心、满意的服务。

优惠活动香港云服务器,免备案在线开通,预装宝塔(bt)面板,独享15M带宽,赠送DDOS防护,免费技术支持,代理低至6折,仅需48元/月!
返回首页

Windows服务器多IP指定出口IP的方法

信息来源:亿速互联修改时间:2026/9/8 16:12:46

先用管理员 PowerShell 查看:

Get-NetIPAddress -AddressFamily IPv4 |
Format-Table IPAddress,InterfaceAlias,PrefixLength,SkipAsSource

然后把你希望作为出口的 IP 设置为:192.168.1.10

Set-NetIPAddress -IPAddress 192.168.1.10 -SkipAsSource $false

其他附加 IP 全部设置为

Set-NetIPAddress -IPAddress 192.168.1.11 -SkipAsSource $true
Set-NetIPAddress -IPAddress 192.168.1.12 -SkipAsSource $true
Set-NetIPAddress -IPAddress 192.168.1.13 -SkipAsSource $true

最后再检查:

Get-NetIPAddress -AddressFamily IPv4 |
Format-Table IPAddress,InterfaceAlias,SkipAsSource

理想状态应该是:

IPAddress       InterfaceAlias   SkipAsSource
---------       --------------   ------------
192.168.1.10    Ethernet         False 出口IP
192.168.1.11    Ethernet         True
192.168.1.12    Ethernet         True
192.168.1.13    Ethernet         True


以下是近期更新的内容