Forum Discussion

Vonaducci's avatar
Vonaducci
New Contributor
2 years ago

WSL2 Port Forwarding?

So I've got no issue port forwarding on my windows 10 server, it works fine, but the issue comes when I'm port forwarding for an application running in WLS2 on that same windows server.

I configured WSL2 so that it uses the ipv4 address 192.168.0.100, and this works just fine as any device on the local network can ping 192.168.0.100 and get a response.

My issue is: when I go to port forward 192.168.0.100 on port 27018, you can't port forward by IP address, rather you must first "select a device for this port forward."

I figured the best way to add wsl2 as a connected device would be through my routers gateway control panel. I clicked on connected devices, then add device with reserved IP, I added WSL2 by entering it's MAC address and reserving 192.168.0.100 for it, and after a second WSL2 appears as a connected device under the "Online Devices-Private Network" tab. After only 2ish minutes though, WSL2 is moved down to "Offline Devices", which means I can't use it for the "select a device for this port forward" step, so there's no way to port forward 192.168.0.100 on port 27018. This is despite the fact wsl2 is certainly still connected and every device on the network can still access it with ping 192.168.0.100.

Worst part is, if I chose "forget this device" in the cox wifi app, the app deletes my WSL2 entry so I can't interact with it anymore, but it's still saved under "Offline Devices" so the IP I reserved for it is permanently reserved for a device that will never go online. I've done this multiple times while testing, so addresses: 192.168.0.16, 192.168.0.17, and 192.168.0.100 are now permanently locked to devices who will never go online. 

Is there any way to port forward by IP address, or a way to make WSL2 not be dropped to "offline devices" despite being reachable by every device on the local network?

If I am quick enough and port forward my wsl2 before it's dropped to "offline devices", will my router continue port forwarding 192.168.0.100 on port 27018 even after it's moved to "offline devices"? That would an okay workaround if so, I only haven't experimented because every time I make an attempt, I risk making more ipv4 addresses reserved to offline devices, and therefore they become inaccessible.

If not the only alternative is to buy a better non-cox router right?

  • Vonaducci wrote:

    If not the only alternative is to buy a better non-cox router right?

    Right. Since Cox moved port forwarding to the cloud I have suggested a non Panoramic router.

  • WiderMouthOpen's avatar
    WiderMouthOpen
    Esteemed Contributor
    Vonaducci wrote:

    If not the only alternative is to buy a better non-cox router right?

    Right. Since Cox moved port forwarding to the cloud I have suggested a non Panoramic router.

    • Vonaducci's avatar
      Vonaducci
      New Contributor

      Thanks guys, I guess I'll just buy a new router.

  • Panoramic Wifi will probably encounter difficulty finding virtual devices hiding behind a physical host.  If you're proficiency level is such you're comfortable managing VM's and port forwarding, you may want to switch to a home router solution that isn't targeted towards the novice user.  Panoramic works for may people but a lot of the bells and whistles that come with other devices are disabled so as to make it easier to use.