Windows firewall blocking port for WSL2 development

Answered

Trying to setup a Java SDK running in WSL2. I can successfully do a mvn install and compile but
when trying to run the application I get this error:

Error connecting to 172.26.0.1:64672; reason: connection timed out: /172.26.0.1:64672
io.netty.channel.ConnectTimeoutException: connection timed out: /172.26.0.1:64672
    at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261)
    at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
    at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:153)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Exiting.
Cannot establish network connection from WSL to Windows host (could be blocked by firewall). More details: https://jb.gg/wsl-firewall


The selected port is blocked by windows firewall and my PC is under company system administration (sad, I know) so I cannot make any firewall changes.

This port is also selected at random it seems, so I cannot create a firewall rule based on ports only. 

Is there a way to tell IntelliJ what port to use instead of selecting a random port? We have a few unblocked ports for development.

0
5 comments

Unfortunately, firewall rules needs to be adjusted to use WSL features in IntelliJ IDEA - https://www.jetbrains.com/help/idea/how-to-use-wsl-development-environment-in-product.html#debugging_system_settings

Please contact your IT/security for help

Feel free to upvote for IDEA-262876

0

Thanks for the reply.

Unfortunately my IT department is adamant not to open all ports on the WSL virtual ethernet interface.
Do you have a port range I can use at least? 

0

There is no specific list of ports WSL can use

0

Thanks,

It would be great to have the option to specify a port to use in the IDE settings.

Where can I ask for this feature change?

0

Please sign in to leave a comment.