LAN access with WSL2 #378
-
LRR Version and OS Bug Details I was scouring the closed issues and could only find that Mojolicious default config sets network to I would assume that LRR should work out of box over LAN so I am unsure as to what the issue may be. Matching Logs
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
Another note to add is that I am running LRR with WSL v2. I just tested switching back to WSL v1 and I have no issues connecting to the server. It asked me to allow perl access to private/public networks with the file location being I noticed that when running WSL v2, LRR creates an ext4 image, while WSL v1 create a rootfs folder under the Distro folder. |
Beta Was this translation helpful? Give feedback.
-
WSL2 currently has some issues related to localhost access by other machines: microsoft/WSL#4636 For now I'd recommend you stick to WSL1 until said issues are fixed by Microsoft. |
Beta Was this translation helpful? Give feedback.
-
Seems like a firewall issue. Try creating an inbound rule for all programs to allow connection on port 3000 and see if it starts working. I think it specifically has to do with making your firewall rule only allow Karen.exe, because when I test on my own device and configure the rule to allow only Karen.exe through port 3000, it breaks and I also become unable to access my server. e: as you both confirmed, it is a WSL2 bug. But if you configure an open rule on port 3000 while on WSL2, it works fine. |
Beta Was this translation helpful? Give feedback.
-
@huntrshado I noticed that while using WSL1, it creates a firewall rule for perl and not the |
Beta Was this translation helpful? Give feedback.
-
Since there's no real fixable issue on my side, I'll be converting this to a discussion so that others can see it if they run into trouble w. WSL2 installs. Glad you got it sorted out! |
Beta Was this translation helpful? Give feedback.
-
Opening the port on the firewall wasn't enough for me. I found the solution in this link: Running this command (as administrator) (and having the port open on the firewall already) made me able to access LANraragi from my local network when using WSL2: But, then I restarted and wanted to see if the port proxy forward was still active. Running the command Turns out that you can't have the port proxy forward active when LANraragi starts, you can only activate it once it has started. I created a couple of bat files to run before and after starting LANraragi, this probably can be integrated into Karen. Bat before running LANraragi (Should return empty):
Bat after running LANraragi (and it's serving locally):
Should return:
|
Beta Was this translation helpful? Give feedback.
Opening the port on the firewall wasn't enough for me. I found the solution in this link:
https://stackoverflow.com/questions/61002681/connecting-to-wsl2-server-via-local-network
Running this command (as administrator) (and having the port open on the firewall already) made me able to access LANraragi from my local network when using WSL2:
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=3000 connectaddress=localhost connectport=3000
But, then I restarted and wanted to see if the port proxy forward was still active. Running the command
netsh interface portproxy show all
showed that it was indeed still active, so I ran LANraragi again and... didn't have access from my …