Wireguard with Network Namespaces

Archit Pandey architpandeynitk at gmail.com
Tue Jun 2 20:18:03 CEST 2020


Hello all,

I'm trying to set-up a wireguard peer-to-peer test using namespaces as
the diagram below.

|--------------|            |----------|            |--------------|
| wg0, ns1 |----------| lo, ns0 |----------| wg1, ns2 |
|--------------|            |----------|            |--------------|

I'm unable to make ping work between the the two peers and get the
following error:

PING 192.168.241.1 (192.168.241.1) 56(84) bytes of data.
>From 192.168.241.2 icmp_seq=1 Destination Host Unreachable
ping: sendmsg: Destination address required
>From 192.168.241.2 icmp_seq=2 Destination Host Unreachable
ping: sendmsg: Destination address required

Any ideas on what could be causing this?

The script I'm using to setup the test can be found here -
https://gist.github.com/archit-p/ad01f715c81f128b271400653d05e09f.

My configs are as follows:

--> client.conf
[Interface]
ListenPort = 1
PrivateKey = kJ0P5RK1/ihw9CKwwVBUzG1SzzBiu3jEuT50c14don4=

[Peer]
PublicKey = MsILnsNuioXMS9qSMn66eDgPEagABYKIQBHpUO+NED8=
AllowedIPs = 0.0.0.0/0,::/0
PreSharedKey = Du3JReQWNFjZJhhUHJzPXfARVNox2UNoVbf2ls4neco=

--> server.conf
[Interface]
ListenPort = 2
PrivateKey = mB6r7QG1zefLRJeYAVUrAa+uDJX/N2tkPqZYg1PRYFM=

[Peer]
PublicKey = 2iyuOB1Q0Yd9hPY4eK57LcejHeslx8LrR8vjmyem+nc=
AllowedIPs = 0.0.0.0/0,::/0
PreSharedKey = Du3JReQWNFjZJhhUHJzPXfARVNox2UNoVbf2ls4neco=

Thank you for help debugging the issue!

Archit.


More information about the WireGuard mailing list