WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* Cannot set endpoint to localhost on windows
@ 2020-08-29 15:58 Hirbod Behnam
  2020-08-30 14:53 ` Alessandro Rinaldi
  0 siblings, 1 reply; 2+ messages in thread
From: Hirbod Behnam @ 2020-08-29 15:58 UTC (permalink / raw)
  To: wireguard

Hello
I'm not sure if this is already reported or not but I found a small
problem with the windows client of wireguard that does not allow users
to use "plugins" on top of wireguard.
So here is my case. I used gost to create a really simple port
forwarder from my localhost to my server with this command: gost
-L=udp://127.0.0.1:12345/1.1.1.1:12345 (that forwards packets on port
12345 to 1.1.1.1:12345 and of course my server is not 1.1.1.1 :D)
Also here is my wireguard config:

[Interface]
PrivateKey = xxxx
Address = 10.9.0.2/24
DNS = 8.8.8.8
[Peer]
PublicKey = xxxx
AllowedIPs = 0.0.0.0/8,1.0.0.0/16,1.1.0.0/24,1.1.1.0/32,1.1.1.2/31,1.1.1.4/30,1.1.1.8/29,1.1.1.16/28,1.1.1.32/27,1.1.1.64/26,1.1.1.128/25,1.1.2.0/23,1.1.4.0/22,1.1.8.0/21,1.1.16.0/20,1.1.32.0/19,1.1.64.0/18,1.1.128.0/17,1.2.0.0/15,1.4.0.0/14,1.8.0.0/13,1.16.0.0/12,1.32.0.0/11,1.64.0.0/10,1.128.0.0/9,2.0.0.0/7,4.0.0.0/6,8.0.0.0/5,16.0.0.0/4,32.0.0.0/3,64.0.0.0/2,128.0.0.0/1
Endpoint = 127.0.0.1:12345
PersistentKeepalive = 25

The allowed IPs are all ip addresses except 1.1.1.1.
When I run the client, the log fills with: [TUN] [xxx-wg0] peer(xxx) -
Failed to send data packet write udp4 0.0.0.0:58932->127.0.0.1:12345:
wsasendto: The requested address is not valid in its context.
And I cannot connect to anything. Sometimes in gost, it says that a
connection is established but I still cannot connect to anything
though wireguard.

Also it's good to know that the exact config works fine with TunSafe,
the official Ubuntu client and openvpn. (I can connect through gost)
Thanks for the project!
Hirbod

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cannot set endpoint to localhost on windows
  2020-08-29 15:58 Cannot set endpoint to localhost on windows Hirbod Behnam
@ 2020-08-30 14:53 ` Alessandro Rinaldi
  0 siblings, 0 replies; 2+ messages in thread
From: Alessandro Rinaldi @ 2020-08-30 14:53 UTC (permalink / raw)
  To: wireguard

Hello,
I have the exact same problem and it's preventing me from using
engarde[0] with the official Wireguard client on Windows. I reported
that to the mailing list some time ago.
Thanks for pointing that out again :)

[0] https://github.com/porech/engarde

On Sat, Aug 29, 2020 at 11:08 PM Hirbod Behnam
<chrome.hiri.angry@gmail.com> wrote:
>
> Hello
> I'm not sure if this is already reported or not but I found a small
> problem with the windows client of wireguard that does not allow users
> to use "plugins" on top of wireguard.
> So here is my case. I used gost to create a really simple port
> forwarder from my localhost to my server with this command: gost
> -L=udp://127.0.0.1:12345/1.1.1.1:12345 (that forwards packets on port
> 12345 to 1.1.1.1:12345 and of course my server is not 1.1.1.1 :D)
> Also here is my wireguard config:
>
> [Interface]
> PrivateKey = xxxx
> Address = 10.9.0.2/24
> DNS = 8.8.8.8
> [Peer]
> PublicKey = xxxx
> AllowedIPs = 0.0.0.0/8,1.0.0.0/16,1.1.0.0/24,1.1.1.0/32,1.1.1.2/31,1.1.1.4/30,1.1.1.8/29,1.1.1.16/28,1.1.1.32/27,1.1.1.64/26,1.1.1.128/25,1.1.2.0/23,1.1.4.0/22,1.1.8.0/21,1.1.16.0/20,1.1.32.0/19,1.1.64.0/18,1.1.128.0/17,1.2.0.0/15,1.4.0.0/14,1.8.0.0/13,1.16.0.0/12,1.32.0.0/11,1.64.0.0/10,1.128.0.0/9,2.0.0.0/7,4.0.0.0/6,8.0.0.0/5,16.0.0.0/4,32.0.0.0/3,64.0.0.0/2,128.0.0.0/1
> Endpoint = 127.0.0.1:12345
> PersistentKeepalive = 25
>
> The allowed IPs are all ip addresses except 1.1.1.1.
> When I run the client, the log fills with: [TUN] [xxx-wg0] peer(xxx) -
> Failed to send data packet write udp4 0.0.0.0:58932->127.0.0.1:12345:
> wsasendto: The requested address is not valid in its context.
> And I cannot connect to anything. Sometimes in gost, it says that a
> connection is established but I still cannot connect to anything
> though wireguard.
>
> Also it's good to know that the exact config works fine with TunSafe,
> the official Ubuntu client and openvpn. (I can connect through gost)
> Thanks for the project!
> Hirbod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 15:58 Cannot set endpoint to localhost on windows Hirbod Behnam
2020-08-30 14:53 ` Alessandro Rinaldi

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git