WSL 2 Networking

preview_player
Показать описание
How do you access WSL 2 Virtual Machines remotely? I'll show you how WSL2 networking works and I'll also show you how to configure the proxy service on your Windows 10 computer to allow connections to your WSL virtual machines. I'll also explain the configuration of the Windows Firewall.

WSL 2 changes the way networking is configured compared to WSL 1. You need to enable proxy of traffic and you need to permit the traffic through the Windows firewall.

Menu:
Overview: 0:00
Network Setup: 0:48
Microsoft Documentation: 1:11
Virtual and Physical Networks: 2:12
Testing from Mac: 6:35
Port Proxy Command: 7:07
Testing from Mac Again: 8:24
Firewall Rules: 9:40
GitHub 4150 Script: 11:09
Pings fail: 13:05

WSL commands:
netsh interface portproxy add v4tov4 listenport=3390 listenaddress=0.0.0.0 connectport=3390 connectaddress=192.168.170.227

Firewall rules:
- Go to control panel and open advanced firewall rules
- allow port 3390 through firewall

WSL 2 Playlist:

Good links:
Ubuntu WSL2 GUI Install: In Ubuntu WSL:

WSL2
WSL 2
WSL 2 Networking
WSL 2 Proxy
WSL proxy
Docker
Ubuntu 20.04
Ubuntu GUI
WSL 2 Ubuntu GUI
WSL Ubuntu GUI
WSL 2
WSL 1
Ubuntu 18.04
windows subsystem for linux
wsl2 ubuntu gui

#wsl2 #ubuntu #windows
Рекомендации по теме
Комментарии
Автор

Menu:
Overview: 0:00
Network Setup: 0:48
Microsoft Documentation: 1:11
Virtual and Physical Networks: 2:12
Testing from Mac: 6:35
Port Proxy Command: 7:07
Testing from Mac Again: 8:24
Firewall Rules: 9:40
GitHub 4150 Script: 11:09
Pings fail: 13:05

WSL commands:
netsh interface portproxy add v4tov4 listenport=3390 listenaddress=0.0.0.0 connectport=3390

Firewall rules:
- Go to control panel and open advanced firewall rules
- allow port 3390 through firewall


Good links:
Ubuntu WSL2 GUI Install: In Ubuntu WSL:

davidbombal
Автор

Thanks David, much appreciated. The proxy command was the thing I was unaware of. These WSL2 videos are introducing a bunch of missing pieces that are making what I know already much more useful.

networktastic
Автор

Your explanations are very clear. This 2 year old video is still relevant. I'm running Ubuntu on WSL 2 on W11 and your video's saved me a lot of time. Thanks!

rudiklein
Автор

David, thank you very much! I had a problem developing an application using the Expo platform on WSL 2, and the mobile phone couldn't connect to WSL or Node JS Server, with your video I was able to understand how the network works on WSL2 and used the netsh command to free the application ports. Thank you so much!

victorbacega
Автор

Excellent video, the way you explained the matter in such a simple way plus providing so much valuable info helped me out a lot! Amazing how even after 2 years this is still usable.

sale
Автор

Thank you very much!!! this was what was missing for me I managed to configure my development environment in react-native in wsl2. I was days trying to connect the Axios backend to port 10.0.2.2:3333 with the Android Studio avd emulator 2 days ago and I hadn't been able to. I tried many things without success and now this video was what was missing, and that made it successful. Thank you very much.

georgealan
Автор

I like how you show everyone the documentation you use. Great way to teach.

DominicFlynn
Автор

Absolutely love your videos, just coming back from 12 years away from Linux. Your videos are fantastic!!

bdubs
Автор

Thank you again David. This video unleashes new possibilities for WSL2. Fine work you do getting this information and explaining to us. Again Saludos desde México.

sergiomancera
Автор

Great explanation David. The beginning was redundant but it works fine to emphasis what IP comes from what node in the network. I would add that this mostly work as it is described but in scenarios when you are using a free port and not reserved like port 80(HTTP) which requires additional steps to get openned

vtgus
Автор

I searched around for the complete guide for the process of Getting GUI. Thanks David. I started to learn from you...

uday_kiran
Автор

Theachers like you are not easy to find in the 🌎
Thanks 👏👏👏👏👏

keivan_adak
Автор

Thank you for this! I have been trying to get WSL2 to work with VS Code Live Server for so long and this solution worked! It was the windows firewall portion I had been missing to allow the port :)

TAVG
Автор

Hi David! Your explanation was useful for me, and now I can execute my django web app from the Ubuntu app for Windows 10 and access to the app from my Android device!! Thank you very much!!!!😄👍👍

gastonsalaya
Автор

This is great just what I was looking for, thanks David

ThePumbaadk
Автор

Great ! Many many thanks, I was struggling with these stuff. Thank you David.

bekman
Автор

This is a great video. I'm new to the whole WSL 2 environment, cause I've been using VMware, but I'll be trying this out on my other laptops for sure. Thanks for the video David, much appreciated. ;-)

KennyGJr
Автор

Great video David thanks for the info. I was able to answer my own question by watching your previous video. Thanks again for all the hard work

michaelcooper
Автор

Great video tutorial about WSL networking, I learned lot's of from your tutorials. Thanks.

BenjaminBiswas
Автор

David, I am from Indonesia..I am new follower u..nice to meet this ..coz your explanation is always clear

mevitu