Disconnect and reconnect PPPoE when a private IP is provided


My ISP has a pool of public and private IPs, and sometimes I get a private IP. On my ASUS router I was using a script to check the IP and restart the WAN if it was a private IP, until it gets a public IP. Is it possible to do the same on Peplink Balance One?