Jump to content
Not connected, Your IP: 3.129.210.35
Sign in to follow this  
xeee

no network connectivity with wireguard interface on a separate interface

Recommended Posts

Hi, I created the wireguard interface and applied the configuration on the init namespace. I then moved it to a "container" namespace with

ip link set wg0 netns container
ip -n container link set wg0 up
I then add an ip to it, and add the default route on my container namespace to be on wg0, but i have no network connectivity. Looking at wireshark, it seems the packets can get out, but cannot come back.
here is some additional info:
gnuwu@anonynowo ~ $ sudo ip -n container a
Password: 
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
9: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none 
    inet 172.16.0.2/32 scope global wg0
       valid_lft forever preferred_lft forever
gnuwu@anonynowo ~ $ sudo ip -n container l
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
9: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/none 
gnuwu@anonynowo ~ $ sudo ip netns exec container wg show
interface: wg0
  public key: (hidden)
  private key: (hidden)
  listening port: 40816

peer: (hidden)
  preshared key: (hidden)
  endpoint: 213.152.161.236:1637
  allowed ips: 0.0.0.0/0, ::/0
  latest handshake: 59 seconds ago
  transfer: 3.76 KiB received, 71.90 KiB sent
  persistent keepalive: every 15 seconds
gnuwu@anonynowo ~ $ sudo ip -n container r
default dev wg0 scope link 
gnuwu@anonynowo ~ $ sudo ip netns exec container ping -c 4 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.

--- 1.1.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3068ms

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...