Adding Dynamic IP to Firewall Address-List

Hi All,

I’m struggling to add a dynamic /32 IP obtained either through VPN or PPP to an address-list. I have 3 WAN interfaces. All 3 are dynamic IP’s. The first (PPPoE) is used for my primary connection with a default route. The second (3G PPP) is used only to dial-up a VPN (SSTP) to the third connection. So I want to route all the traffic from my only from one PC on my LAN through the second (3G PPP) to the third connection (L2TP) to access certain resources on the VPN.

My reason for wanting this is to use the Firewall to block certain subnets from accessing connection 2 & 3
.
I know can do this by using a separate Routerboard for the 3G connection to the VPN, and just route traffic from said LAN IP to the connection, but I don’t have another one right now that has a USB port.

Is there a script to do this? Can someone please assist.

You can use the Interface names instead…

maybe you can add a script in the ppp profile

:local ips [/ppp active get [find name=$user] address];
/ip firewall address-list add address=$ips list=Name

Hi,

Apologies for the late reply. Thank you I will try this and feedback to you soon.