Problems with Wiregurd on iPhone

I am using a UDMPro with the VPN Wireguard server and iPhone SE. I configure the server and scan the QR code with my phone and I can get the Wireguard to work within my lan (can ping my local devices). I cannot get Wireguard to work when on cellular and away from the lan. I have used the scanned QR code and also pasted the generated code but can’t reach my local network. I am using
Unifi OS 3.2.12-Network 8.1.113-Wireguard for IOS 1.0.16(27)-Quad 9 DNS servers-iPhone 17.4.1 on the Visible cell network. Can anyone help me make this work when away from my LAN. Thanks
I cannot get any help from the UNIFI community.

Welcome to the forums but I don’t have any experience with iPhones so hope someone can help.

What Wireguard client are you using on the iPhone? What OS version on the iPhone? Lastly, when you setup the Wireguard server on the UDM Pro, what port did you use?

Wireguard for IOS 1.0.16(27)-Quad 9 DNS servers-iPhone 17.4.1
The server supplied port 52810. I was wondering if I need to port forward this somewhere.

Yes you need to portforward and setup rules

I watched the video which is 3 years old and doesn’t help me much. I would think that the Unifi Wireguard server would make all the necessary rules to make this work. Like I said it works on wifi with my lan but doesn’t when on cellular. The iPhone won’t connect to anything on cellular with WG turned on. I am not the greatest at setting up firewall rules and could use some help.

On the wireguard iOS client, go under settings and scroll down to on-demand activation. Be sure cellular is turned on. You can also configure WiFi SSIDs where you want “except these” SSIDs to turn off Wireguard when home or a WiFi location you don’t want the VPN.