# Wireguard from android to raspberrypi not working over internet

**URL:** <https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564>\
**Category:** Troubleshooting\
**Created:** [April 19, 2022, 5:27pm UTC](https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564 "2022-04-19T17:27:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![remoteuser](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@remoteuser](https://forum.remote.it/u/remoteuser)\
**Post date:** [April 19, 2022, 5:27pm UTC](https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564/1 "2022-04-19T17:27:17Z")

</div>

Hi,  
First of all i want to thank remote.it team for building such an awesome product. I have used it for ssh and rdp, where it works great.  
I am facing some issue in making it work with wireguard vpn.

I was able to setup remote.it client on raspberrypi. My raspberrypi also has pihole and pivpn setup. I can run wireguard from my android phone if i am connected on the same LAN( by using the local ip address in wireguard: 192.168.1.123:51800). But when I try to connect outside LAN, using the remoteit tunnel from my android phone(localhost:51800, which tunnels to raspberrypi port 51800), the connection never seems to work.  
Remoteit client is configured properly, as I have also tested VNC connection type on the same raspberrypi machine using cellular network.

Is wireguard connection type supported with raspberrypi?

This is my connection type:

- Service Name:vpn
- Service Port:51899
- Service Protocol:UDP
- Service Type:WireGuard
- Service ID: \*\*\*\*\*\*\*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [April 23, 2022, 12:05am UTC](https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564/2 "2022-04-23T00:05:03Z")

</div>

One thing I would double check is your port configuration:

Service Port:51899

does not match 51800.

On the Pi itself, can you run:

```auto
sudo netstat -lpn | grep udp

```

and send the result?

---

<div class="post-metadata">

**Author:** ![remoteuser](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@remoteuser](https://forum.remote.it/u/remoteuser)\
**Post date:** [April 25, 2022, 6:09am UTC](https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564/3 "2022-04-25T06:09:53Z")

</div>

I am using 51899 vs the default 51800 everywhere, which i forgot to mention earlier.’

Netstat results:  
udp 0 0 127.0.0.1:43074 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:68 0.0.0.0:\* 416/dhcpcd  
udp 0 0 0.0.0.0:36935 0.0.0.0:\* 695/connectd  
udp 0 0 0.0.0.0:631 0.0.0.0:\* 4056/cups-browsed  
udp 0 0 0.0.0.0:44168 0.0.0.0:\* 704/connectd  
udp 0 0 127.0.0.1:49818 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:55963 0.0.0.0:\* 704/connectd  
udp 0 0 0.0.0.0:59066 0.0.0.0:\* 637/connectd  
udp 0 0 0.0.0.0:51899 0.0.0.0:\* -  
udp 0 0 127.0.0.1:36545 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:46291 0.0.0.0:\* 644/connectd  
udp 0 0 127.0.0.1:40154 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:44258 0.0.0.0:\* 637/connectd  
udp 0 0 0.0.0.0:5353 0.0.0.0:\* 374/avahi-daemon: r  
udp 0 0 0.0.0.0:54022 0.0.0.0:\* 695/connectd  
udp 0 0 127.0.0.1:44808 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:44338 0.0.0.0:\* 644/connectd  
udp 0 0 127.0.0.1:5980 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:59743 0.0.0.0:\* 661/connectd  
udp 0 0 0.0.0.0:54153 0.0.0.0:\* 613/connectd  
udp 0 0 0.0.0.0:39890 0.0.0.0:\* 613/connectd  
udp 0 0 0.0.0.0:53216 0.0.0.0:\* 374/avahi-daemon: r  
udp 0 0 127.0.0.1:56306 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:51197 0.0.0.0:\* 677/connectd  
udp 0 0 0.0.0.0:44045 0.0.0.0:\* 661/connectd  
udp 0 0 127.0.0.1:38425 0.0.0.0:\* 402/remoteit\_linux\_  
udp 0 0 0.0.0.0:35867 0.0.0.0:\* 677/connectd

Remote.it connection type:  
connection type:

- Service Name:vpn
- Service Port:51899
- Service Protocol:UDP
- Service Type:WireGuard
- Service ID: \*\*\*\*\*\*\*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![remoteuser](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@remoteuser](https://forum.remote.it/u/remoteuser)\
**Post date:** [April 25, 2022, 6:20am UTC](https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564/4 "2022-04-25T06:20:44Z")

</div>

Also adding wireguard configuration here:

**pi@raspberrypi** : sudo wg show  
**interface** : wg0  
**public key** : EZ+yoAwc80Dg8/zZELeWyu13osDFzQt6RiliQvDDfXw=  
**private key** : (hidden)  
**listening port** : 51899  
**peer** : ICQXTiitMcj49ZK5no4RKGuUiTcMSo0zDCKFNo1pm2A=  
**preshared key** : (hidden)  
**allowed ips** : 10.6.0.2/32

Wireguard Client configuration:  
**pi@raspberrypi** : cat /home/pi/configs/client.conf  
[Interface]  
PrivateKey = (hidden)  
Address = 10.6.0.2/24  
DNS = 10.6.0.1

[Peer]  
PublicKey = EZ+yoAwc80Dg8/zZELeWyu13osDFzQt6RiliQvDDfXw=  
PresharedKey = (hidden)  
Endpoint = localhost:51899  
AllowedIPs = 0.0.0.0/0, ::0/0

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [May 5, 2022, 10:12pm UTC](https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564/5 "2022-05-05T22:12:00Z")

</div>

On the Android device, are you actually able to achieve a P2P (localhost) connection? I just realized that the mobile app works differently than the desktop. If you get a proxy connection (e.g. [proxyXX.rt3.io](http://proxyXX.rt3.io)) then this approach won’t work. You could still do it in a pinch but it would require editing the client configuration endpoint/port every time you make a connection.

---

<div class="post-metadata">

**Author:** ![12TA](https://avatars.discourse-cdn.com/v4/letter/1/ce7236/32.png) [@12TA](https://forum.remote.it/u/12TA)\
**Post date:** [May 7, 2022, 6:15pm UTC](https://forum.remote.it/t/wireguard-from-android-to-raspberrypi-not-working-over-internet/564/6 "2022-05-07T18:15:37Z")

</div>

Yes I do get a working proxy as you describe but it does not seem to work when pasted in on the client config with Android or Windows10. Hence my question is it tried and tested?
