Code Monkey home page Code Monkey logo

Comments (12)

micahmo avatar micahmo commented on July 27, 2024

Hi @Gaponovoz, sorry about these issues!

By looking at the Server Status output, it appears to me that the client is never making a successful handshake with the server. Otherwise, you'd see this important part.

image

Is there any chance that your client is not able to make outgoing requests to 51820? For example, on my corporate network, all ports other than 80/443 are blocked for outgoing traffic. Maybe you can use one of those more standard ports on your server, if you're not sure (and if you're not using them for anything else).

Another possibility is to look at the logs in the WireGuard app on the server. That should tell you if the client is able to make a connection to the server, but the server is dropping it for some reason, or if it's not even getting that far.

image

from wgserverforwindows.

Gaponovoz avatar Gaponovoz commented on July 27, 2024

Let me see...

  1. My client also has all ports open and not behind NAT, no firewalls too.
  2. I tried hosting wireguard on another port like 50000 or something, no success too. Using 443 or 80 is not an option...
  3. I can connect easily to wireguards hosted on linux on standard ports, I tested that.
  4. Here is all my server wireguard log after I "connected" to my vpn:
    image

Nothing is being logged even after I connect to this vpn and try loading websites!!!!!!

from wgserverforwindows.

micahmo avatar micahmo commented on July 27, 2024

It seems like the client is not even making a connection to the server. For comparison, here is what the server logs would look like if the client connected with a bad public key.

image

Also, unless you see a handshake in the Server Status, don't even bother trying any websites. 😉

Is there any other way you could test connectivity from your client to your server? Maybe spin up a small Python http server with python -m http.server 80 --bind 0.0.0.0 just to see if you can make a connection.

I can see your public IP address in one of your screenshots (you might want to delete it), and I can't ping it. That may be because ICMP is blocked, but just another data point.

from wgserverforwindows.

Gaponovoz avatar Gaponovoz commented on July 27, 2024

Oh that was the wrong IP I entered! I resolved one automatically so now the IP address is right and matches the real one. SO after updating server conf and client conf I retried and finally got some errors:
image
image

Also, hosting a simple server makes it easily reachable from the Interner but not after I connect to my VPN.

from wgserverforwindows.

micahmo avatar micahmo commented on July 27, 2024

Oh that was the wrong IP I entered! I resolved one automatically so now the IP address is right and matches the real one.

Alrighty, I'm glad we solved one issue! Now we're getting an actual connection.

I see an interesting message in the server logs: Packet has unallowed src IP (192.168.31.8). Last time you sent your client config, its WG address was 10.253.0.2. Has that changed?

from wgserverforwindows.

Gaponovoz avatar Gaponovoz commented on July 27, 2024

Here is the client log and server's client config:
image
image

Yeah, its WG address is still 10.253.0.2 both on server and on client... Seems to be absolutely alright...?

image

from wgserverforwindows.

micahmo avatar micahmo commented on July 27, 2024

Seems to be absolutely alright...?

Yes it does. Nothing seems obviously wrong. 😞

In your client config screenshot, it seems like maybe the client handshake worked. Can you connect again and take a screenshot of Server Status?

Someone suggested just making new keys (server and client) and trying again.

Sorry I'm running out of ideas.

from wgserverforwindows.

Gaponovoz avatar Gaponovoz commented on July 27, 2024

Here is the View Server Status from the time I last connected (yesterday):
image

I generated a new keypair for the server, then - for the client. Exported my .conf again, connected and... Same problem - no net access. User log and server log attached:
image
image

By the way, should I also create "Preshared key"? It seems it is not necessary to.

Anyway, I created a temporary server (with disposable IP and certificates) to demonstrate how I set up the server (am I missing some point????? I read the WG4W manual carefully anyway though.):
https://user-images.githubusercontent.com/105719188/235962700-c8df2e88-4267-4026-ac33-af5450b18ffd.mp4

WTF? I did this on video and my VPN worked!... Despite I did the same thing like 4-5 times before. Well, this time I first tried Windows Server 2022.
I am not sure should we make this issue solved because something strange is going on and I still cannot make WG4W work on my 2016 server I really want... I tried once more - generated new keypairs, rebooted the server and failed again with such client and server logs:
image
on server I have infinite "Sending handshake initiation to peer..."

from wgserverforwindows.

micahmo avatar micahmo commented on July 27, 2024

Here is the View Server Status from the time I last connected . . . generated a new keypair for the server, then - for the client. Exported my .conf again, connected and... Same problem

This is so weird, especially considering the Server Status shows the handshake, but the logs show that it's failing.

By the way, should I also create "Preshared key"? It seems it is not necessary to.

No it's not necessary, but you can do it as a test.

WTF? I did this on video and my VPN worked!

Oh wow! Of course it worked when you made a video haha! 😄

Well, this time I first tried Windows Server 2022.

I don't think the OS is the problem. I've tested this as far back as 2012 R2.

I am not sure should we make this issue solved because something strange is going on and I still cannot make WG4W work on my 2016 server I really want

No, I agree, the issue is not solved. Unfortunately, I don't know what else to try. I haven't had this problem myself, but there are so many quirks in Windows that it doesn't surprise me it doesn't always work perfectly. I would leave this issue open in case you have any more updates or in case anyone else in the community has any ideas. Again, very sorry about these issues. 😞

from wgserverforwindows.

Gaponovoz avatar Gaponovoz commented on July 27, 2024

I think the reason why it only worked on WInServer 2022 is because it was the only OS totally in English! All the previous ones I tried were not; even after changing whole UI language to English, updating Windows, making sure User folder and Usernames are in 100% English it all didn't work out. But the last OS I tried was English out of the box. And it worked. This is the reason i guess (STILL NOT SURE BUT TESTED)

from wgserverforwindows.

Gaponovoz avatar Gaponovoz commented on July 27, 2024

Bonus issue (not addressed to your project but I'm interested if you have an approach):
I can connect to Wireguard VPN from my phone and PC easily but when I try to connect from my VirtualBox VM I have totally no Internet access. Issue tested with various servers and configs.

from wgserverforwindows.

micahmo avatar micahmo commented on July 27, 2024

I think the reason why it only worked on WInServer 2022 is because it was the only OS totally in English! All the previous ones I tried were not

Wow that's a great catch and really interesting theory. If you happen to do any more testing and can confirm this limitation with some certainty, I'll put it in the README. Although now that I think about it, I believe I've seen some people using this on a Chinese OS and it worked fine (e.g., #12).

I can connect to Wireguard VPN from my phone and PC easily but when I try to connect from my VirtualBox VM I have totally no Internet access. Issue tested with various servers and configs.

Again I think we'd need to figure out where this is dying. Is it able to make the successful handshake? Are there any interesting logs on the client or server? Obviously using a VM complicates things slightly in terms of networking, but I've successfully tested WS4W as both a server and client on a VM, although I haven't tested VirtualBox. Maybe I should!

from wgserverforwindows.

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.