Community discussions

MikroTik App
 
TheEnsona
newbie
Topic Author
Posts: 35
Joined: Sat May 09, 2009 7:22 am

ip address

Tue Oct 27, 2009 9:12 pm

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.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: ip address

Tue Oct 27, 2009 9:21 pm

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
 
TheEnsona
newbie
Topic Author
Posts: 35
Joined: Sat May 09, 2009 7:22 am

Re: ip address

Tue Oct 27, 2009 9:43 pm

Right on thnx i'll check it out
 
User avatar
Nexon
newbie
Posts: 27
Joined: Tue Jan 31, 2006 9:38 am
Location: Serbia
Contact:

Re: ip address

Tue Jan 12, 2010 9:26 pm

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"