wsl ip


### Expose port
```type# make virtual netwiorkwsl -d Ubuntu-18.04 -u root ip addr add 192.168.50.16/24 broadcast 192.168.50.255 dev eth0 label eth0:1netsh interface ip add address "vEthernet (WSL)" 192.168.50.88 255.255.255.0# forwardingnetsh interface portproxy add v4tov4 listenport=8000 listenaddress=0.0.0.0 connectport=8000 connectaddress=192.168.50.16netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 connectport=8080 connectaddress=192.168.50.16# serve at wsl```


### Remove
```typenetsh interface portproxy reset```


1. inbound firewall
2. netsh
3. ufw 
4. port forwarding
5. 0.0.0.0
6. make wsl static

> [Static IP on WSL 2 · Issue #418 · MicrosoftDocs/WSL](https://github.com/MicrosoftDocs/WSL/issues/418)

> [WSL2 고정 IP 할당하기(Static IP) - 달소씨의 하루](https://blog.dalso.org/linux/wsl2/11430)





