Giter Club home page Giter Club logo

Comments (6)

skupfer avatar skupfer commented on May 30, 2024 1

Better double check everything ... proxy profile got changed...

from wsl-vpnkit.

sakai135 avatar sakai135 commented on May 30, 2024

Have you modified your resolv.conf? Can you try updating your wsl.conf and resolv.conf so it uses the default WSL 2 auto-generated IP or 192.168.67.1 as your DNS server?

from wsl-vpnkit.

skupfer avatar skupfer commented on May 30, 2024

I didn't modify the configs and only followed your initial setup guide and added the command to my rc file.

Ok, I edited /etc/wsl.conf and added

[network]
generateResolvConf = false

Shutdown wsl wsl --shutdown and started it again. Removed the old resolv.conf and recreated with nameserver 192.168.67.1. Another shutdown to be sure. Still only able to ping the internal network.

from wsl-vpnkit.

sakai135 avatar sakai135 commented on May 30, 2024

In your logs, do you have something similar to the following lines? Are any of them successful?

wsl.exe -d wsl-vpnkit cat /var/log/wsl-vpnkit.log
check: ✔️ nslookup success for example.com A using 192.168.67.1
check: ✔️ nslookup success for example.com A using 192.168.67.1
check: ✔️ nslookup success for example.com A using 172.26.112.1
check: ✔️ nslookup success for example.com A using 1.1.1.1
check: ✔️ ping success to IPv4 external host (example.com)
check: ✔️ wget success for https://example.com

If the check with 1.1.1.1 is successful, another option to try would be to add both DNS servers to your resolv.conf:

nameserver 192.168.67.1
nameserver 1.1.1.1

from wsl-vpnkit.

skupfer avatar skupfer commented on May 30, 2024

I get both successful and failed checks even if i add the second ns

starting wsl-vpnkit
cleaning up iptables...
iptables cleanup done
cleaning up ip...
ip: ioctl 0x8913 failed: No such device
ip cleanup done
vpnkit.exe exists at /mnt/c/Users/kupfer/wsl-vpnkit/wsl-vpnkit.exe
npiperelay.exe exists at /mnt/c/Users/kupfer/wsl-vpnkit/npiperelay.exe
waiting for /var/run/wsl-vpnkit.sock ...
starting socat-npiperelay...
found /var/run/wsl-vpnkit.sock
starting vpnkit-tap-vsockd...
starting vpnkit...
successfully created TAP device eth1
starting in connect mode with path=/var/run/wsl-vpnkit.sock and tap=eth1
2021/11/16 10:18:24 open //./pipe/wsl-vpnkit: The system cannot find the file specified.
EOF reading from socket: closing

Failed to read hello from client
Failed to negotiate vmnet connection
wsl-vpnkit.exe: [INFO] Setting handler to ignore all SIGPIPE signals
wsl-vpnkit.exe: [INFO] Version is 6ef760094979188296cec0d5732610c021f8d3d3
wsl-vpnkit.exe: [INFO] System SOMAXCONN is 2147483647
wsl-vpnkit.exe: [INFO] Will use a listen backlog of 2147483647
wsl-vpnkit.exe: [INFO] No periodic Gc.compact enabled
wsl-vpnkit.exe: [WARNING] There is no database: using hardcoded network configuration values
wsl-vpnkit.exe: [INFO] DNS server configured with no builtin DNS names; everything will be forwarded
wsl-vpnkit.exe: [INFO] 2 upstream DNS servers are configured
wsl-vpnkit.exe: [ERROR] While watching /etc/resolv.conf: ENOENT
wsl-vpnkit.exe: [INFO] Disabling transparent HTTP redirection
wsl-vpnkit.exe: [INFO] Updating resolvers to use host resolver
wsl-vpnkit.exe: [INFO] Secure random number generator is available
wsl-vpnkit.exe: [INFO] Add(3): DNS configuration changed to: use host resolver
wsl-vpnkit.exe: [INFO] DNS server configured with builtin DNS names [ gateway.internal -> 192.168.67.1, host.internal -> 192.168.67.2, vm.internal -> 192.168.67.3 ]
wsl-vpnkit.exe: [INFO] Will use the host's DNS resolver
wsl-vpnkit.exe: [INFO] New Gateway forward configuration: []
wsl-vpnkit.exe: [INFO] Configuration server_macaddr = f6:    ; max_connection = None; dns_path = None; dns = ; resolver = Host; domain = None; allowed_bind_addresses = 0.0.0.0; gateway_ip = 192.168.67.1; host_ip = 192.168.67.2; lowest_ip = 192.168.67.3; highest_ip = 192.168.67.14; dhcp_json_path = None; dhcp_configuration = None; mtu = 1500; http_intercept = None; http_intercept_path = None; port_max_idle_time = 300; host_names = host.internal; gateway_names = gateway.internal; vm_names = vm.internal; udpv4_forwards = []; tcpv4_forwards = []; gateway_forwards_path = None; pcap_snaplen = 128
wsl-vpnkit.exe: [ERROR] Failed to parse address '' from hosts file
wsl-vpnkit.exe: [INFO] C:\Windows\System32\drivers\etc\hosts file has bindings for host.docker.internal gateway.docker.internal kubernetes.docker.internal
Server reports version 22, commit 0123456789012345678901234567890123456789
wsl-vpnkit.exe: [INFO] Vmnet.Server.negotiate: received { magic = VMN3T; version = 22; commit =  }
wsl-vpnkit.exe: [INFO] Generated UUID on behalf of client: f7a917f2-
wsl-vpnkit.exe: [INFO] Vmnet.Server.negotiate: received Ethernet f7a917f2-
wsl-vpnkit.exe: [INFO] Vmnet.Server.negotiate: sending { mtu = 1500; max_packet_size = 1550; client_macaddr = 02:     }
wsl-vpnkit.exe: [INFO] Vmnet.Server.listen: rebinding the primary listen callback
wsl-vpnkit.exe: [INFO] Vmnet.Server.listen: starting event loop
wsl-vpnkit.exe: [INFO] Connected Ethernet interface f6:    
VMNET VIF has MAC 02:      
started vpnkit-tap-vsockd
configuring ip...
wsl-vpnkit.exe: [INFO] Client mac: 02:         server mac: f6: 
wsl-vpnkit.exe: [INFO] TCP/IP ready
wsl-vpnkit.exe: [INFO] TCP/IP stack connected
ip config done
adding rules to iptables...
iptables done
wsl-vpnkit.exe: [INFO] Connected Ethernet interface f6:         
wsl-vpnkit.exe: [INFO] UDP interface connected on 192.168.67.2
check: ✔️ ping success to IPv4 WSL 2 gateway / Windows host (172. )
check: ✔️ ping success to IPv4 VPNKit Windows host (192.168.67.2)
wsl-vpnkit.exe: [INFO] Connected Ethernet interface f6:               
wsl-vpnkit.exe: [INFO] UDP interface connected on 192.168.67.1
check: ✔️ ping success to IPv4 VPNKit gateway (192.168.67.1)
check: ✔️ nslookup success for example.com A using 192.168.67.1
check: ✔️ nslookup success for example.com A using 192.168.67.1
check: ✔️ nslookup success for example.com A using 172. 
wsl-vpnkit.exe: [INFO] Connected Ethernet interface f6:                
wsl-vpnkit.exe: [INFO] UDP interface connected on 1.1.1.1
check: ❌ nslookup fail for example.com A using 1.1.1.1
wsl-vpnkit.exe: [INFO] Connected Ethernet interface f6:                   
wsl-vpnkit.exe: [INFO] UDP interface connected on 93. 
check: ❌ ping fail to IPv4 external host (example.com)
check: ❌ nslookup fail for example.com AAAA using 192.168.67.1
check: ❌ nslookup fail for example.com AAAA using 192.168.67.1
check: ❌ nslookup fail for example.com AAAA using 172. 
check: ❌ nslookup fail for example.com AAAA using 1.1.1.1
ping: bad address 'example.com'
check: ➖ ping fail to IPv6 external host (example.com)
wget: bad address 'example.com'
check: ❌ wget fail for https://example.com
wsl-vpnkit.exe: [INFO] Hostnet_icmp 192.168.67.3 id=99 -> 93.        id=0: expiring ICMP NAT rule

from wsl-vpnkit.

sakai135 avatar sakai135 commented on May 30, 2024

When connected to your VPN, can you ping 1.1.1.1 successfully from the Windows side?

from wsl-vpnkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.