I have set up wireguard on ubuntu 20.04.3 on a Digital Ocean droplet.
I have added a client on an android phone.
As regards traffic through and out to the internet, all looks well, it was a clean installation. Visiting ifconfig.co on my phone shows my DO address.
My question(s) are this.
I would like to be able to ping the server ip address in the wg0 network?
Further I would like to be able to access Digital Ocean local private address on eth1.
Neither seems to be available.
Server Configuration: 10.8.0.1 would be server, and 10.8.0.2 is android.
I can't ping 10.8.0.1 from android. Digital Ocean provides a private address on eth1, and i am unable to ping it. For the record, my next step is to install pihole and i do not want listening on public eth0, but rather provide access only to the wireguard client.
Is there a setting that i'm missing? I thought it was working properly, but then it stopped.
Address = 10.8.0.1/32
SaveConfig = true
PostUp = ufw route allow in on wg0 out on eth0
PostUp = iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
PostUp = ip6tables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
PreDown = ufw route delete allow in on wg0 out on eth0
PreDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
PreDown = ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 51820
PrivateKey = redacted
[Peer]
PublicKey = redacted
PresharedKey = redacted
AllowedIPs = 10.8.0.2/32
ANDROID setting:
client setting is straight forward
Address = 10.7.0.2/24
PrivateKey = redacted
allowedips = 0.0.0.0/0, ::/0```