Wireguard client NOT connected when AllowedIPs = 0.0.0.0/0

Thanks, @cubimol

Very strange thigns (for me) happening here.

When I do this:
AllowedIPs = 0.0.0.0/1,128.0.0.0/1

in WG CE client, then…

CoreELEC:~ # wg show
interface: wg0
public key: blablabla
private key: (hidden)
listening port: 51820

peer: blablabla
endpoint: IP:51820
allowed ips: 0.0.0.0/1, 128.0.0.0/1
latest handshake: 54 seconds ago
transfer: 1.39 KiB received, 3.56 GiB sent
persistent keepalive: every 25 seconds

Some seconds ago…

CoreELEC:~ # wg show
interface: wg0
public key: blablabla
private key: (hidden)
listening port: 51820

peer: blablabla
endpoint: IP:51820
allowed ips: 0.0.0.0/1, 128.0.0.0/1
latest handshake: 1 minute, 12 seconds ago
transfer: 1.82 KiB received, 4.82 GiB sent
persistent keepalive: every 25 seconds

I don’t know why, but it starts to send a lot of GB in few seconds and I can’t connect to my WG CE tvheadend server, for example.
Very strange for me.

When I do this:

Creatig WG client in CE:
/storage/.config/wireguard/wireguard.config

Like this:

[provider_wireguard]
Type = WireGuard
Name = CoreELEC3M.ip
Host = IP # I need to put IP. It does not work well with domain.
WireGuard.Address = 10.1.1.33/32
WireGuard.ListenPort = 51820
WireGuard.PrivateKey = blablabla
WireGuard.PublicKey = blablabla
WireGuard.DNS = 8.8.8.8, 1.0.0.1, 8.8.4.4, 1.1.1.1
WireGuard.AllowedIPs = 0.0.0.0/0
WireGuard.EndpointPort = 51820
WireGuard.PersistentKeepalive = 25

IT WORKS, PERFECT, but… it’s neccesary to connect manually each time (Coreelec settings > Connect).

When I try to connect automatically, it DOES NOT WORK.

CoreELEC:~ # wg show
interface: wg0
public key: blablabla
private key: (hidden)
listening port: 51820

peer: blablabla
preshared key: (hidden)
endpoint: IP:51820
allowed ips: 0.0.0.0/0
latest handshake: 1 minute, 27 seconds ago
transfer: 61.59 MiB received, 1.03 MiB sent
persistent keepalive: every 25 seconds

I have no idea about the cause that it works (manually) but NOT automatic.

It’s not an “elegant” method and of course NOT unnatended… but it works.

Kind regards