Page 1 of 1

Public IP - problem with IP Cloud

Posted: Thu Jun 19, 2014 2:35 pm
by hwtech
Hi, i'm trying to use IP cloud service but sometimes it gives me an error : "DDNS server received request from xx.xx.xxx.xxx but your local ip was yy.yy.yyy.yyy"

At home my mikrotik use pppoe-client on WAN directly to ISP (standard contract for domestic use, dynamic ip). Sometimes i noticed that Dynamic IP in IP Addresses (automatically assigned via pppoe-client) is different from the IP address that I see if I go, for example, on the site www.whatsmyip.org

Instead, sometimes the two IP addresses match! :?

No special configuration on mikrotik, only masquerade rule on pppoe.

What can i do? Thanks

Re: Public IP - problem with IP Cloud

Posted: Thu Jun 19, 2014 3:04 pm
by normis
can you tell us your serial number? we can check the logs

Re: Public IP - problem with IP Cloud

Posted: Thu Jun 19, 2014 3:28 pm
by hwtech
Hi normis, thanks for reply. My serial is 4185022491E3/312

At this time the two IP addresses do not match

Re: Public IP - problem with IP Cloud

Posted: Thu Jun 19, 2014 3:38 pm
by normis
Looks like the PPPoE tunnel disconnects, could this be possible?
Maybe you have dial-on-demand?

Re: Public IP - problem with IP Cloud

Posted: Thu Jun 19, 2014 8:53 pm
by hwtech
Dial on demand is disabled. If i disable pppoe-client and enable it after a few seconds i get an IP address other than previous (obviously because i don't have static public ip but dynamic). Sometimes the new IP address under menu IP/Addresses is the usual i see on www.whatsmyip.org

My mikrotik isn't always on, sometimes i turn it off for the night. There is a problem with pppoe-client and my ISP?

Thanks

Re: Public IP - problem with IP Cloud

Posted: Fri Jun 20, 2014 9:55 am
by Neilson
Dial on demand is disabled. If i disable pppoe-client and enable it after a few seconds i get an IP address other than previous (obviously because i don't have static public ip but dynamic). Sometimes the new IP address under menu IP/Addresses is the usual i see on http://www.whatsmyip.org

My mikrotik isn't always on, sometimes i turn it off for the night. There is a problem with pppoe-client and my ISP?

Thanks
Does your local IP Address ever appear to be from 100.64.0.0/10? If so then that indicates you are behind a Carrier Grade NAT (CGN) System as this is shared IP Space for this purpose.

Regards
Alexander

Re: Public IP - problem with IP Cloud

Posted: Fri Jun 20, 2014 11:49 am
by krisjans
Sometimes the new IP address under menu IP/Addresses is the usual i see on http://www.whatsmyip.org
What address you see in IP Address (on your router) when it differs from address detected by http://www.whatsmyip.org ?

Re: Public IP - problem with IP Cloud

Posted: Fri Jun 20, 2014 12:47 pm
by hwtech
When the two addresses are different in IP/Addresses i always see something like 172.16.xxx.xxx , instead of www.whatsmyip.org that show me always something like 2.40.xxx.xx

But when the two addresses are the same the IP is 188.153.xxx.xxx (always!)

I'm behind a Carrier Grade NAT (CGN) System? What do you think?

Thanks

Re: Public IP - problem with IP Cloud

Posted: Fri Jun 20, 2014 1:03 pm
by normis
It looks like your ISP is giving you different addresses each time, so you must ask them why this happens. Maybe they sometimes run out of public IP addresses, and then give you a private one.

Re: Public IP - problem with IP Cloud

Posted: Sat Jun 21, 2014 4:06 am
by Neilson
The 172.16.0.0/12 is a private space but not the "Shared" space dedicated for CGN.

They may be using CGN or just regular NAT but if you have addresses from 192.168.0.0/16, 10.0.0.0/8 or 172.16.0.0/12 then that is also private space and would not allow normal internet packets to get to you.

While some ISP's may let you get a forwarding done if its changing that often then you are unlikely to be able to keep that without requesting a fixed IP and in that case you get no benefit of the cloud IP service than just pointing any domain to that IP (unless you don't own your own domain.

Regards
Alexander

Re: Public IP - problem with IP Cloud

Posted: Sat Jun 21, 2014 4:21 am
by rextended
The 172.16.0.0/12 is a private space but not the "Shared" space dedicated for CGN
Some CGN do not change internal used addresses after the release of shared space 100.64.0.0/10

Re: Public IP - problem with IP Cloud

Posted: Sat Jun 21, 2014 1:36 pm
by hwtech
You think it is possible to create a script that checks the ip address on startup just got and if, for example, does not begin with 188.xx.xx.xx disable and re-enable the pppoe-client to obtain an address that is not private? :?:

Thanks

Re: Public IP - problem with IP Cloud

Posted: Sat Jun 21, 2014 1:50 pm
by rextended
Yes, but warning for the loop....

************

Sì, ma bisogna vedere se ci sono ip pubblici disponibili in quel momento, magari ti ha dato l'ip privato proprio perché sono esauriti..

Re: Public IP - problem with IP Cloud

Posted: Fri Jul 25, 2014 12:59 am
by hwtech
How can I write a script that makes a comparison between the dynamic address on pppoe and a class of addresses 172.16.0.0/16 (because i see that when isp give me a NAT public IP it is always of this class 172.16.xx.xxx/32). Usually after 3 or 4 disconnect and reconnect of pppoe-client the isp give me a real Public IP.

Thanks in advance!

------------------------------------------------------------------------

Si hai ragione potrei beccare un momento in cui non ci sono ip pubblici disponibili e quindi finire in un loop con il pppoe-client che si disconnette e riconnette continuamente. Per il momento voglio vedere se con uno script di base riesco a fare il controllo, successivamente implementerò un numero max di tentativi per bypassare l'eventuale problema... :D

Re: Public IP - problem with IP Cloud

Posted: Fri Jul 25, 2014 1:55 am
by rextended
Ammazza! un mese e qualche giorno dopo... ;)

**************

For know if your IP, for ezample 172.16.6.6/32 are inside 172.16.0.0/12

:put (172.16.6.6/32 in 172.16.0.0/12)

It return true if your IP is on the interval.

Re: Public IP - problem with IP Cloud

Posted: Fri Jul 25, 2014 2:37 am
by hwtech
I tried this :

:local newIP [/ip address get [find interface="pppoe-wan"] address];

:if ($newIP in 172.16.0.0/16) do={
:log info "NAT isp";
}

but nothing.....someone can help me?

I have no experience in scripting... :(

----------------------------------------------------------

Mi sapresti dire se più o meno ci siamo oppure sono totalmente fuori strada? Grazie :D

Re: Public IP - problem with IP Cloud

Posted: Fri Jul 25, 2014 3:52 pm
by rextended
I tried this :

:local newIP [/ip address get [find interface="pppoe-wan"] address];

:if ($newIP in 172.16.0.0/16) do={
:log info "NAT isp";
}

but nothing.....someone can help me?

I have no experience in scripting... :(

----------------------------------------------------------

Mi sapresti dire se più o meno ci siamo oppure sono totalmente fuori strada? Grazie :D
E' /12 non /16 e ricordati le virgolette:
:if ([/ip address get [find interface="pppoe-wan"] value-name=address] in 172.16.0.0/12) do={
 :log info message="Indirizzo fornito dal provider interno a 172.16.0.0/12";
};

Re: Public IP - problem with IP Cloud

Posted: Sat Jul 26, 2014 1:42 pm
by hwtech
:if ([/ip address get [find interface="pppoe-wan"] value-name=address] in 172.16.0.0/12) do={
 :log info message="Indirizzo fornito dal provider interno a 172.16.0.0/12";

};
[/quote]

Ho provato ma nel log non compare nulla, che possa essere un bug della versione 6.17? Ho notato che "/ip address get [find interface="pppoe-wan"] value-name=address" da come risultato l'indirizzo giusto però lo da completo di netmask (/32), che vada tolta perchè l'operatore "in" possa fare il controllo? :?

--------------------------------------------------------------------------------------------------------------------------------

I tried but nothing appears in the log, it might be a bug in version 6:17? I noticed that "/ ip address get [find interface =" pppoe-wan "] = value-name address" returns the right address as a result, however, inclusive of netmask (/32), which should be removed because the operator "in" can do control?

Re: Public IP - problem with IP Cloud

Posted: Sun Jul 27, 2014 1:32 am
by rextended
:global ppoeclientaddr value=[/ip address get [find interface="pppoe-wan"] value-name=address];
:set $ppoeclientaddr value=([[:parse ":return $ppoeclientaddr"]]);
:if ($ppoeclientaddr in 172.16.0.0/12) do={
 :log info message="Indirizzo fornito dal provider interno a 172.16.0.0/12";
};
oppure
:if (([[:parse (":return ".[/ip address get [find interface="pppoe-wan"] value-name=address]]]) in 172.16.0.0/12) do={
 :log info message="Indirizzo fornito dal provider interno a 172.16.0.0/12";
};

Re: Public IP - problem with IP Cloud

Posted: Tue Jul 29, 2014 11:43 am
by Stuntrider
what you need to add a rule in the firewall to work ip cloud. I have a rule in the late drop input and it interferes with the service.

Re: Public IP - problem with IP Cloud

Posted: Wed Jul 30, 2014 2:01 pm
by hwtech
Thanks rextended for examples....i'm working on it! :D

-------------------------------------------------------------------

Sto aggiustando i tempi all'interno dello script perchè ho notato che la connessione pppoe non sempre ci mette 1/2 secondi per tornare up, alcune volte ce ne mette anche 7/8. Grazie per l'aiuto con lo script! 8)

Re: Public IP - problem with IP Cloud

Posted: Wed Jul 30, 2014 2:20 pm
by normis
you need to accept established connections, that's all that is needed