All of lore.kernel.org
 help / color / mirror / Atom feed
From: "René van Dorst" <opensource@vdorst.com>
To: wireguard@lists.zx2c4.com
Subject: Re: netns.sh: Sending cookie response for denied handshake
Date: Fri, 06 Oct 2017 11:22:15 +0000	[thread overview]
Message-ID: <20171006112215.Horde.PVbxF1OCC2ugTFVlOcX22n3@www.vdorst.com> (raw)
In-Reply-To: <20171006105940.Horde.-YgH3Xzem0aIzxlyFy3xGun@www.vdorst.com>

Also WireGuard 0.0.20171001 has it.


[root@cubox tests]# ./netns.sh
[+] ip netns add wg-test-863-0
[+] ip netns add wg-test-863-1
[+] ip netns add wg-test-863-2
[+] NS0: ip link set up dev lo
[+] NS0: ip link add dev wg0 type wireguard
[  172.621122] wireguard: loading out-of-tree module taints kernel.
[  172.628391] wireguard: module verification failed: signature and/or  
required                                                                
                                               key missing - tainting  
kernel
[  172.642541] wireguard: routing table self-tests: pass
[  172.650545] wireguard: nonce counter self-tests: pass
[  172.660875] wireguard: curve25519 self-tests: pass
[  172.665806] wireguard: chacha20poly1305 self-tests: pass
[  172.673951] wireguard: blake2s self-tests: pass
[  173.014255] wireguard: ratelimiter self-tests: pass
[  173.019415] wireguard: WireGuard 0.0.20171001 loaded. See  
www.wireguard.com f                                                     
                                                         or information.
[  173.027933] wireguard: Copyright (C) 2015-2017 Jason A. Donenfeld  
<Jason@zx2c                                                             
                                                 4.com>. All Rights  
Reserved.
[  173.040380] wireguard: wg0: Interface created
[+] NS0: ip link set wg0 netns wg-test-863-1
[+] NS0: ip link add dev wg0 type wireguard
[  173.128583] wireguard: wg0: Interface created
[+] NS0: ip link set wg0 netns wg-test-863-2
[+] wg genkey
[+] wg genkey
[+] wg pubkey
[+] wg pubkey
[+] wg genpsk
[+] NS1: ip addr add 192.168.241.1/24 dev wg0
[+] NS1: ip addr add fd00::1/24 dev wg0
[+] NS2: ip addr add 192.168.241.2/24 dev wg0
[+] NS2: ip addr add fd00::2/24 dev wg0
[+] NS1: wg set wg0 private-key /dev/fd/63 listen-port 1 peer  
xU8gpc+t5m8/Aa7+Vs                                                      
                                                         
JXj/U7yS05L3+5ffVxLOOuWDw= preshared-key /dev/fd/62 allowed-ips  
192.168.241.2/32                                                        
                                                      ,fd00::2/128
[  173.412056] wireguard: wg0: Peer 1 created
[+] NS2: wg set wg0 private-key /dev/fd/63 listen-port 2 peer  
XdjZJkqTsFnVFO/gHW                                                      
                                                         
Hf6Xqribof8bHd2BeFUZAjA2Y= preshared-key /dev/fd/62 allowed-ips  
192.168.241.1/32                                                        
                                                      ,fd00::1/128
[  173.457206] wireguard: wg0: Peer 2 created
[+] NS1: ip link set up dev wg0
[+] NS2: ip link set up dev wg0
[+] NS1: ip link show dev wg0
[+] NS1: wg set wg0 peer xU8gpc+t5m8/Aa7+VsJXj/U7yS05L3+5ffVxLOOuWDw=  
endpoint 1                                                              
                                                27.0.0.1:2
[+] NS2: wg set wg0 peer XdjZJkqTsFnVFO/gHWHf6Xqribof8bHd2BeFUZAjA2Y=  
endpoint 1                                                              
                                                27.0.0.1:1
[+] NS2: ping -c 10 -f -W 1 192.168.241.1
PING 192.168.241.1 (192.168.241.1) 56(84) bytes of data.
.[  173.687604] wireguard: wg0: Sending handshake initiation to peer 2  
(127.0.0.                                                               
                                               1:1)
[  173.689508] wireguard: wg0: Sending cookie response for denied  
handshake mess                                                          
                                                    age for 127.0.0.1:2
[  173.689608] wireguard: wg0: Receiving cookie response from 127.0.0.1:1
.........
--- 192.168.241.1 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 98ms

[+] NS0: ip link del dev wg0
[+] NS1: ip link del dev wg0
[  174.898691] wireguard: wg0: Peer 1 (127.0.0.1:2) destroyed
[  174.908717] wireguard: wg0: Interface deleted
[+] NS2: ip link del dev wg0
[  174.960702] wireguard: wg0: Peer 2 (127.0.0.1:1) destroyed
[  174.982706] wireguard: wg0: Interface deleted
[+] ip netns del wg-test-863-1
[+] ip netns del wg-test-863-2
[+] ip netns del wg-test-863-0
[root@cubox tests]#
[+] ip netns add wg-test-863-2
[+] NS0: ip link set up dev lo
[+] NS0: ip link add dev wg0 type wireguard
[  172.621122] wireguard: loading out-of-tree module taints kernel.
[  172.628391] wireguard: module verification failed: signature and/or  
required key missing - tainting kernel
[  172.642541] wireguard: routing table self-tests: pass
[  172.650545] wireguard: nonce counter self-tests: pass
[  172.660875] wireguard: curve25519 self-tests: pass
[  172.665806] wireguard: chacha20poly1305 self-tests: pass
[  172.673951] wireguard: blake2s self-tests: pass
[  173.014255] wireguard: ratelimiter self-tests: pass
[  173.019415] wireguard: WireGuard 0.0.20171001 loaded. See  
www.wireguard.com for information.
[  173.027933] wireguard: Copyright (C) 2015-2017 Jason A. Donenfeld  
<Jason@zx2c4.com>. All Rights Reserved.
[  173.040380] wireguard: wg0: Interface created
[+] NS0: ip link set wg0 netns wg-test-863-1
[+] NS0: ip link add dev wg0 type wireguard
[  173.128583] wireguard: wg0: Interface created
[+] NS0: ip link set wg0 netns wg-test-863-2
[+] wg genkey
[+] wg genkey
[+] wg pubkey
[+] wg pubkey
[+] wg genpsk
[+] NS1: ip addr add 192.168.241.1/24 dev wg0
[+] NS1: ip addr add fd00::1/24 dev wg0
[+] NS2: ip addr add 192.168.241.2/24 dev wg0
[+] NS2: ip addr add fd00::2/24 dev wg0
[+] NS1: wg set wg0 private-key /dev/fd/63 listen-port 1 peer  
xU8gpc+t5m8/Aa7+VsJXj/U7yS05L3+5ffVxLOOuWDw= preshared-key /dev/fd/62  
allowed-ips 192.168.241.2/32,fd00::2/128
[  173.412056] wireguard: wg0: Peer 1 created
[+] NS2: wg set wg0 private-key /dev/fd/63 listen-port 2 peer  
XdjZJkqTsFnVFO/gHWHf6Xqribof8bHd2BeFUZAjA2Y= preshared-key /dev/fd/62  
allowed-ips 192.168.241.1/32,fd00::1/128
[  173.457206] wireguard: wg0: Peer 2 created
[+] NS1: ip link set up dev wg0
[+] NS2: ip link set up dev wg0
[+] NS1: ip link show dev wg0
[+] NS1: wg set wg0 peer xU8gpc+t5m8/Aa7+VsJXj/U7yS05L3+5ffVxLOOuWDw=  
endpoint 127.0.0.1:2
[+] NS2: wg set wg0 peer XdjZJkqTsFnVFO/gHWHf6Xqribof8bHd2BeFUZAjA2Y=  
endpoint 127.0.0.1:1
[+] NS2: ping -c 10 -f -W 1 192.168.241.1
PING 192.168.241.1 (192.168.241.1) 56(84) bytes of data.
.[  173.687604] wireguard: wg0: Sending handshake initiation to peer 2  
(127.0.0.1:1)
[  173.689508] wireguard: wg0: Sending cookie response for denied  
handshake message for 127.0.0.1:2
[  173.689608] wireguard: wg0: Receiving cookie response from 127.0.0.1:1
.........
--- 192.168.241.1 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 98ms

[+] NS0: ip link del dev wg0
[+] NS1: ip link del dev wg0
[  174.898691] wireguard: wg0: Peer 1 (127.0.0.1:2) destroyed
[  174.908717] wireguard: wg0: Interface deleted
[+] NS2: ip link del dev wg0
[  174.960702] wireguard: wg0: Peer 2 (127.0.0.1:1) destroyed
[  174.982706] wireguard: wg0: Interface deleted
[+] ip netns del wg-test-863-1
[+] ip netns del wg-test-863-2
[+] ip netns del wg-test-863-0

  reply	other threads:[~2017-10-06 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 10:59 netns.sh: Sending cookie response for denied handshake René van Dorst
2017-10-06 11:22 ` René van Dorst [this message]
2017-10-06 12:54   ` Jason A. Donenfeld
2017-10-06 13:48     ` René van Dorst
2017-10-06 13:58       ` Jason A. Donenfeld
2017-10-06 14:03         ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171006112215.Horde.PVbxF1OCC2ugTFVlOcX22n3@www.vdorst.com \
    --to=opensource@vdorst.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.