0

I used this guide here to setup wireguard on a CentOS machine.

I have my private key, my public key, the firewall and my wg0.conf:

[Interface]
Address = 192.168.5.1/24
SaveConfig = true
ListenPort = 31194
PrivateKey = <from the private key file>
EndPoint = mydynamic_dns_name.com:31194

[Peer]
PublicKey = <the public key generated on my client>
AllowedIPs = 192.168.5.2/32

When I run wg it shows this config as well. When I try to create a QR code with this config using the command

grep -v '^#' /etc/wireguard/wg0.conf | qrencode -t ansiutf8

I get the following error:

Unable to import Tunnel: Unknown attribute in interface.

I tried to setup a client manually on Android, using this here:

[Interface]
Address = 192.168.5.2/24
PrivateKey = <generated by the cellpgone>

[Peer]
AllowedIPs = 0.0.0.0/24
Endpoint = mydynamic_dns_name.com:31194
PublicKey = <public key from my server>

When I try to connect, it says that it's connected instantly but transfers no data over the connection. When I check my external IP it's still that of the cell provider.

I have my router setup to forward the port to the centos in my local network.

I don't know how to proceed from here or to debug this.

uncovery
  • 295
  • 2
  • 12
  • You probably will need to connect via IPv6. The usability of IPv4 on mobile networks varies widely from full connectivity (very rare!) to only web sites work and only sometimes. – Michael Hampton Sep 12 '20 at 00:33
  • Thanks for the suggestion, @MichaelHampton but that can't be it, my OpenVPN setup with IPv4 is working fine. – uncovery Sep 12 '20 at 00:50
  • 1
    OpenVPN is a totally different protocol on a different port. So maybe it can't be it, but it's something to keep in mind. – Michael Hampton Sep 12 '20 at 01:12
  • The wireguard on the CentOS side should know if the tunnel worked: `wg` should display `latest handshake: ...` with a recent time. Then you might still have routing issues in case android itself installs some `ip rule`. Maybe then trying from CentOS a `ping 192.168.5.2` would tell if something at all is working (a reply or nothing, but not `sendmsg: Destination address required`) – A.B Sep 12 '20 at 18:11

0 Answers0