3

I'm currently running an RPC (TCP) server in ubuntu (19.04) inside the WSL(2) in windows, listening to 0.0.0.0:7860. If I run any query inside the WSL(2) itself with address 127.0.0.1:7860 it works. But, If I do the same query in Windows directly it just hangs waiting for the reply, (apparently is able to send it, although it never arrives at the server, so the server it is not able to reply back). I just need it to be able to contact it from my inner local network. I'm really confused and totally open to suggestions. Thanks for your help in advance.

5
  • WSL1 or WSL 2 ? Commented Aug 6, 2019 at 20:17
  • What steps did you follow to do that in WSL?
    – Biswapriyo
    Commented Aug 7, 2019 at 9:29
  • It was WSL2, sorry not to mention. The problem was listening to 0.0.0.0, listening to the specific IP that can be got in ifconfig solve the problem. Is some common misbehave that happens there according to some documentation I found. There are some configuration to make it work, but for my specific case it was simpler to just listen to the local ip (Since I do not really want to listing to outer connections). Ill post an answer shortly, so in case someone have the same issue have an example here.
    – Netwave
    Commented Aug 8, 2019 at 9:58
  • @Netwave - Since you solved your ow problem, submitting an answer would be the correct course of action, instead of submitting a comment that will eventually be deleted
    – Ramhound
    Commented Aug 8, 2019 at 10:02
  • @Ramhound, yeah, I had it in mind (In fact I said that in the comment). It just has been a busy couple of days and I'll do it asap :)
    – Netwave
    Commented Aug 8, 2019 at 10:04

1 Answer 1

0

The solution to my specific problem wasn't really difficult. To have a bit of context, WSL(2) has some issues when a process is listening to 0.0.0.0 (although I must say that a python http.server worked). I simply make the server listen to the specific IP reported in ifconfig => 192.168.42.1, and then I connected to the same address from the client.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .