Set Oray in routeros of local area network
routeros can run Oray, but in Oray's official script, routeros is the default Internet router.
(Oray official documentation: http://service.oray.com/question/869.html)
{local ipaddrlocal server "http://ddns.oray.com"local domain" domain name "local par" / ph/update\? & hostname=$domain&myip=$ipaddr "local users" username "local paswd" password "set ipaddr [/ ip address get [/ ip address find interface=pppoe-out1] address]: set ipaddr [: pick $ipaddr 0 ([len $ipaddr]-3)] / tool fetch url= ($server. $par) mode=http user=$users password=$paswd}
can see from line 8 that the script treats the IP of the pppoe-out1 interface as a public network IP, which means that routeros must be an Internet router for the script to take effect.
but if routeros is in the local area network (for example, routeros is used as an intranet server) and there is a layer of router outside, then the script must be modified, as long as routeros can also access the Internet.
{local ipaddr;/tool fetch url= "http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txtlocal ip [file get mypublicip.txt contents] put $ip:set ipaddr" $ip "; local server" http://ddns.oray.com";local domain "Domain name"; local par "/ ph/update\? & hostname=$domain&myip=$ipaddr"; local users "user name"; local paswd "password"; / tool fetch url= ($server. $par) mode=http user=$users password=$paswd;}
The first five lines of code in is to let routeros get the current public network IP online, save it in mypublicip.txt, then log in to Oray and register IP.
(reference: https://forum.mikrotik.com/viewtopic.php?t=73287)