Page 1 of 1

ip address

Posted: Tue Oct 27, 2009 9:12 pm
by TheEnsona
I'm fairly new to scrpits and was wondering if there was a way I can pull the ip address from an interface and email it. An example of what i'm trying to do is. I have dsl with centurytel and I run pppoe out of my routerboard and I dont want to pay the cost to have a static address so I was just going to create a script that could get the ip from the pppoe on my routerboard and email it to myself.

Re: ip address

Posted: Tue Oct 27, 2009 9:21 pm
by fewi
While you can do that, a more effective way would be dynamic DNS. Check out changeip.com and the correlating script on the wiki at http://wiki.mikrotik.com/wiki/Dynamic_D ... angeIP.com

Re: ip address

Posted: Tue Oct 27, 2009 9:43 pm
by TheEnsona
Right on thnx i'll check it out

Re: ip address

Posted: Tue Jan 12, 2010 9:26 pm
by Nexon
Or if you insist, you can do this:


:log info "ip info beginning now"
/tool e-mail set server=[:resolve smtp.xxxxxxx.com]
:delay 10s
:log info "ip being emailed"
/tool e-mail send to="xxx@xxxxx.com" subject=([/system identity get name]. \
" ip info") from=[/system identity get name] body=([ /ip address get [/ip address find interface=pppoe-out1 ] address ]. \
" public ip address")
:log info "ip info finished"