Community discussions

MikroTik App
 
User avatar
fengyuclub
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Mon Dec 09, 2013 8:50 am

how to get a regular ip for myisp adsl?

Tue Aug 30, 2016 10:38 am

I press this script(http://forum.mikrotik.com/viewtopic.php ... 73#p552202), if wan ip change, send e-mail notification, has been working satisfactorily. ip-per-acquisition are xx.xx.xx.2 ~ xx.xx.xx.12, how to make it in a fixed ip, such as xx.xx.xx.10, if not xx.xx.xx.10 , repeatedly dial, get to know xx.xx.xx.10. script can be used to achieve it, I hope to provide ideas. Thank you.
Please forgive my English, it comes from Google Translation.
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: how to get a regular ip for myisp adsl?

Tue Aug 30, 2016 12:59 pm

Why not simply use ip > cloud?

If you have a web or other kind of server behind the mikrotik, you want to be available from outside, just create a CNAME (on your domain DNS) referring to the routerboard xxxxxxxxxx.sn.mynetname.net record.
 
User avatar
fengyuclub
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Mon Dec 09, 2013 8:50 am

Re: how to get a regular ip for myisp adsl?

Wed Aug 31, 2016 4:34 am

Why not simply use ip > cloud?

If you have a web or other kind of server behind the mikrotik, you want to be available from outside, just create a CNAME (on your domain DNS) referring to the routerboard xxxxxxxxxx.sn.mynetname.net record.
Thank you pukkita, maybe I did not explain what I mean, I am not for easy access to my rb450g, in order to solve my upnp mapping. Wan ip address changes each time the interface, upnp on the failure, so I hope wan adsl connection interface can be fixed ip. Or is my thinking there is a problem, solve upnp problem, there should be better ways.
 
User avatar
fengyuclub
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Mon Dec 09, 2013 8:50 am

Re: how to get a regular ip for myisp adsl?

Wed Aug 31, 2016 5:43 am

http://forum.mikrotik.com/viewtopic.php ... pnp#p59994This topic is the same problem and I hope Solutions
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: how to get a regular ip for myisp adsl?

Wed Aug 31, 2016 1:08 pm

What's the 450G ROS version? firmware version?

That post is almost 10 years old... in addition, there have been lots of uPNP fixes.
 
User avatar
fengyuclub
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Mon Dec 09, 2013 8:50 am

Re: how to get a regular ip for myisp adsl?

Thu Sep 01, 2016 3:11 am

rb450g v6.36.2 fireware is 3.24 . The latest version
 
2frogs
Forum Veteran
Forum Veteran
Posts: 713
Joined: Fri Dec 03, 2010 1:38 am

Re: how to get a regular ip for myisp adsl?

Thu Sep 01, 2016 12:40 pm

Try this script. schedule it to run every 5mins. It will check if the ppoe has a new IP and if it does, it will remove the entries for upnp.
:global currentIP;

:local newIP [/ip address get [find interface="ppoe1"] address];

:if ($newIP != $currentIP) do={
    /ip firewall nat remove [find comment~"^upnp.*"];
    :put "ip address $currentIP changed to $newIP";
    :set currentIP $newIP;
}
Be sure to change the interface=ppoe1 to match your ppoe name.
 
User avatar
fengyuclub
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Mon Dec 09, 2013 8:50 am

Re: how to get a regular ip for myisp adsl?

Thu Sep 01, 2016 1:10 pm

Try this script. schedule it to run every 5mins. It will check if the ppoe has a new IP and if it does, it will remove the entries for upnp.
:global currentIP;

:local newIP [/ip address get [find interface="ppoe1"] address];

:if ($newIP != $currentIP) do={
    /ip firewall nat remove [find comment~"^upnp.*"];
    :put "ip address $currentIP changed to $newIP";
    :set currentIP $newIP;
}
Be sure to change the interface=ppoe1 to match your ppoe name.
Thanks you ,@2frogs.Nice! it worked. But why not "/ip firewall nat remove [find dst-address = xx.xx.xx.xx]" or "/ip firewall nat remove [find dst-address = $currentIP]", does not matter, this issue has been resolved. But why not put it to me, you want to get the ip address, it has been dial-up, I want to know the ip address, stop dialing, this purpose is to obtain a static ip address. If so, then you can achieve great.
 
User avatar
fengyuclub
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Mon Dec 09, 2013 8:50 am

Re: how to get a regular ip for myisp adsl?

Fri Sep 02, 2016 1:02 pm

What's the 450G ROS version? firmware version?
That post is almost 10 years old... in addition, there have been lots of uPNP fixes.
I carefully observed the ip address range my adsl out (isp) obtained, xx.xx.xx.2 ~ xx.xx.xx.12, how to make adsl out to get the desired ip address, otherwise, have been dialing.
Sincerely hope you can help me solve.
 
User avatar
fengyuclub
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Mon Dec 09, 2013 8:50 am

Re: how to get a regular ip for myisp adsl?

Mon Sep 05, 2016 12:20 pm

I used the phrase "/ ip firewall nat remove [find comment ~" ^ upnp *. "];" After the wan ip change can delete the old upnp mapping.