ArchWSL icon indicating copy to clipboard operation
ArchWSL copied to clipboard

Can not access Windows via localhost

Open FlyinCow opened this issue 3 years ago • 3 comments

I'm using proxychains4 as my shell proxy, but I can not access 127.0.0.1:7890 where a proxy in Windows is running in WSL. Using LAN address of Windows works. The same thing happend when using dev server in node (vite), I started a dev server on localhost:3000 in WSL but I can not access it in Windows. I can access it in WSL though. There may be something wrong with vEthenet(WSL)

I'm using WSL2, Windows ver 10.0.19042.1165

FlyinCow avatar Aug 12 '21 02:08 FlyinCow

In addition, after install ArchWSL, these issues come with my Ubuntu distro, too.

FlyinCow avatar Aug 12 '21 02:08 FlyinCow

Ok things start getting wired now... I had my Arch distro backuped and recoveried, and now I can access it from windows with localhost... the different is that my subsystemd didn't work this time.

FlyinCow avatar Aug 12 '21 09:08 FlyinCow

You can't access Windows host by localhost in wsl2, I mean, you just can't......... The reason you can access wsl host in Windows is Microsoft does some hack to it.

But still you can access Windows by a local adress, you can get it by running this in your wsl shell cat /etc/resolv.conf | grep nameserver | awk '{print $2}'

PhyX-Meow avatar Oct 05 '21 05:10 PhyX-Meow