# How to Get Ip Public Behind Modem - MikroTik Script RouterOS

    In this scenario How can I Find The Public Ip behind the modem By mikrotik script?

    Users <--> Switch <--> Mikrotik <---------> Modem <----???---> Internet

    /tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txt
    local ip [file get mypublicip.txt contents ]
    put $ip
    Credit: Unknown, Thanks for sharing