Created
October 13, 2024 06:28
-
-
Save SnowyPainter/c8efb9de7831df13c076d1b9c1d91fb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#먼저 인바운드 규칙을 만드세요. | |
# PowerShell 스크립트 | |
# 1. 기존 portproxy 설정 삭제 | |
netsh interface portproxy delete v4tov4 listenport=4000 listenaddress=0.0.0.0 | |
# 2. WSL2의 eth0 IP 주소 가져오기 | |
$wslIP = wsl hostname -I | ForEach-Object { $_.Trim() } | |
# 3. 새로운 portproxy 설정 추가 | |
netsh interface portproxy add v4tov4 listenport=4000 listenaddress=0.0.0.0 connectport=4000 connectaddress=$wslIP | |
# 4. UFW에서 4000번 포트 허용하고 재시작 | |
wsl sudo ufw allow 4000 | |
wsl sudo ufw disable | |
wsl sudo ufw enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment