Skip to content

Instantly share code, notes, and snippets.

@liongkj
Created September 6, 2021 05:38
Show Gist options
  • Select an option

  • Save liongkj/f873e3f1a3d49dea92684fd680b9ec4f to your computer and use it in GitHub Desktop.

Select an option

Save liongkj/f873e3f1a3d49dea92684fd680b9ec4f to your computer and use it in GitHub Desktop.
route_ssh_to_wsl
wsl.exe sudo /etc/init.d/ssh start
$wsl_ip = (wsl hostname -I).trim()
Write-Host "WSL Machine IP: ""$wsl_ip"""
netsh interface portproxy add v4tov4 listenport=65320 connectport=65320 connectaddress=$wsl_ip listenaddress=0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment