需要开启Windows防火墙
2023-02-10T01:39:41.png
在开启端口转发
2023-02-10T01:43:17.png

后记,这个不固定IP,还需要固定IP

wsl -d Ubuntu-22.04 -u root ifconfig wsl -d Ubuntu-22.04 -u root
ifconfig eth0 172.20.0.2/24 wsl -d Ubuntu-22.04 -u root route add
default gw 172.20.0.1 wsl -d Ubuntu-22.04 -u root service ssh start
powershell -c "Get-NetAdapter -IncludeHidden 'vEthernet (WSL)' |
Get-NetIPAddress | Remove-NetIPAddress -Confirm:$False;
New-NetIPAddress -IPAddress 172.20.0.1 -PrefixLength 24
-InterfaceAlias 'vEthernet (WSL)'; Get-NetNat | ? Name -Eq WSLNat | Remove-NetNat -Confirm:$False; New-NetNat -Name WSLNat
-InternalIPInterfaceAddressPrefix 172.20.0.0/24;"

标签: none

已有 6 条评论

  1. 叼茂SEO.bfbikes.com

  2. 文章已具雏形,需进一步聚焦核心问题。

  3. ?技术类评语?

  4. 文字流畅如丝,语言优美动人,读来令人心旷神怡。

  5. 东方明珠客服开户联系方式【182-8836-2750—】?μ- cxs20250806
    东方明珠客服电话联系方式【182-8836-2750—】?- cxs20250806】
    东方明珠开户流程【182-8836-2750—】?薇- cxs20250806】
    东方明珠客服怎么联系【182-8836-2750—】?薇- cxs20250806】

  6. 遇见约到家可以睡么a0gy.cn

添加新评论

歌曲封面
0:00