For ipsec vpn with the remote site on a dynamic ip address you will need to use aggressive mode and host id instead of gateway ip address. The kb outlining the SRX side configuration for that is here in the knowledge base. You will need to find the similar configuration that matches from UniFi.
https://supportportal.juniper.net/s/article/SRX-Configure-site-to-site-IPsec-VPN-where-remote-site-has-dynamic-IP-address-and-SRX-has-static-IP-address
------------------------------
Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)
http://puluka.com/home------------------------------
Original Message:
Sent: 09-30-2023 21:06
From: Leetrix
Subject: VPN site-to-site (Unifi Dream Machine to Juniper SRX345
Hello everyone, everything good ? I would like to know if it is possible to close a site-to-site VPN between a Unifi Dream Machine and a Juniper srx 345.Remembering that at the Unifi Dream Machine location I do not have internet with a fixed IP, the IP is dynamic.
------------------------------
Leandro Gomes
------------------------------