Closed K-Zanaty closed 10 months ago
Problem: The Linux client in WSL was unable to establish a TCP connection with the server running on the same Windows machine.
Solution:
The solution involved using the specific IP address of the Ethernet Adapter for WSL (Hyper-V firewall), which was found to be 172.31.176.1. This IP is essential for communication between the Windows host and WSL.
The client application in WSL was updated to connect to this IP address, allowing it to communicate with the server on the Windows host.
Used ipconfig in the Windows command prompt to identify the IP address of the Ethernet Adapter for WSL. Configured the client in WSL to connect to 172.31.176.1, aligning with the server's network. Verified that the Windows firewall settings permitted incoming connections on the server's port. Outcome: By using the identified IP address, the client in WSL successfully established a connection with the server on the Windows host. This approach is particularly relevant for ensuring connectivity in a mixed environment involving WSL and Windows.
When installing WSL, connection in ethernet between WSL and Windows does not succeed (localhost).
Could be solved with separate laptop.