0

On server,

[Interface]
Address = 10.13.13.1
ListenPort = 51820
PrivateKey = <...>
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
# peer1
PublicKey = <...>
AllowedIPs = 10.13.13.2/32
# AllowedIPs = 0.0.0.0/0

On client,

[Interface]
Address = 10.13.13.2
PrivateKey = <...>
ListenPort = 51820
DNS = 8.8.8.8

[Peer]
PublicKey = <...>
Endpoint = <...>:51820
AllowedIPs = 0.0.0.0/0

The server is running inside a docker, the client is running on Ubuntu 18.04. I'm not being able to send all the traffic through the tunnel. If I bring up the wg0 interface on the client and try to connect to a website, it doesn't work. However, ping 8.8.8.8 works. Any idea what is going on?

When brought up, `wg-quick` executes the following command on the client:

# wg-quick up wg1
[#] ip link add wg1 type wireguard
[#] wg setconf wg1 /dev/fd/63
[#] ip -4 address add 10.13.13.2 dev wg1
[#] ip link set mtu 1420 up dev wg1
[#] resolvconf -a tun.wg1 -m 0 -x
[#] wg set wg1 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg1 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n
sherlock
  • 141
  • 5
  • because 0.0.0.0/0 does not work in case of windows there is a small checkbox in the editor about this to route or not route all traffic and afaik it starts with a bit higher number – djdomi Oct 18 '21 at 04:06

0 Answers0