allow localhose wsl2
# Inside your c:Users<User> create a .wslconfig file
>
[wsl2]
localhostForwarding=true
>EOF
allow localhose wsl2
# Inside your c:Users<User> create a .wslconfig file
>
[wsl2]
localhostForwarding=true
>EOF
access wiindows host from wsl2
# You should run the following command in a powershell run as administrator:
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
# Then in WSL 2 add this line to your .profile
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
# Then use 'hostip:<your-desired-port>' to access any service runnin on your windows host from inside WSL 2
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us