Community discussions

MikroTik App
 
poinths
newbie
Topic Author
Posts: 29
Joined: Tue May 09, 2006 5:52 am

Walled Garden and SSL sites intermittent problem

Thu Sep 16, 2010 11:11 am

Received a call from a customer that they suddenly couldn't access our SSL secured payment pages, which are in the Hotspot Walled Garden list. They are using the RB1100 and the Walled Garden entry is simply like "*.my-domain-name.com".
While this seemed to have worked fine for a few months, they are now frequently experiencing the problem that they are unable to access the SSL payment pages. I then deleted the wildcard domain and added the domain as FQDN with each hostname and protocol (80/443), but still the same problem. We then rebooted the RB1100, but still no luck. I had to add the IP address into the Walled Garden IP list and then it worked. But I prefer using domain names as it is getting complicated when using PayPal with their multiple, regional different IP addresses.

I then run a test on my RB450G and RB750 and got the same problems ... but not all the times.
It seems to be related to the SSL cert. When using Godaddy's Standard SSL cert and Comodo, I got the problem, while using other certs I did not. Google's Chrome reported "Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL Protocol error." Firefox reports "The connection was interrupted".
Well, it seems these same errors occur for every https page not included in the Walled Garden as well, instead of being redirected to the login page.
Once the page cannot be reached, the page remains unreachable despite many page reload attempts. When I then go to a different SSL site, secured with e.g. a Godaddy cert, the page loads and then the first 'unloadable' page can also be loaded successfully and the problem disappears. I have to restart the browser in order to reproduce the page load problem.
This is a big problem as there is no indication that customers cannot use the payment pages. The amount of payments simply drop.
I have tried this with 3 different RBx and ROS 4.11.
I did not experience any problems with the more expensive SSL certs, but with the entry level certs.
For PayPal payment pages I would have to know all the different IP addresses in different regions of the world and enter them into the 'Walled Garden IP List'. Time as in timeout also seems to be a factor as the problem reoccurs after some time. I am trying to get a reproducible test scenario, but it is simply intermittent and difficult to catch.

Have the problem again right now as I can reach https://www.paypal.com, but I cannot reach http://www.paypalobjects.com despite that they are in the Walled Garden.
When I disable the Hotspot server, I immediately can reach the pages. I am using Chrome, FF, Safari on a Mac MacBook Pro as the hotspot client. When I add e120.g.akamaiedge.net to the Walled Garden, a CNAME of http://www.paypalobjects.com I suddenly have access to http://www.paypalobjects.com.

Here is another example with a Godaddy Standard SSL cert:
- I add *.onlinewellnessassociation.com to the Walled Garden
- I visit www.onlinewellnessassociation.com and click on the Login button, which redirects me to the https page and I get the same error ... I am unable to reach the login page via the Hotspot Walled Garden entry.
 
poinths
newbie
Topic Author
Posts: 29
Joined: Tue May 09, 2006 5:52 am

Re: Walled Garden and SSL sites intermittent problem

Thu Oct 07, 2010 8:53 am

Well, my post has been online for a few weeks and it seems nobody else is experiencing the SSL problems I get.
I just tested it again after I deleted all Walled Garden entries and just added *.onlinewellnessassociation.com.

1. I can visit http://www.onlinewellnessassociation.com without problems and without getting to the hotspot login page
2. When I click on the 'Login' button on the http://www.onlinewellnessassociation.com I immediately get an error message when going to the https site.
Firefox reports "The connection was interrupted" and Safari cannot establish a secure connection.

I selected the http://www.onlinewellnessassociation.com site because they also use the low cost Godaddy ssl cert.
It seems I do not get the problems with other certs ... except Comodo.

Problem seen with ROS 4.11 and RB450G, RB750 and RB1100.

Anybody willing to go for a test? Thanks!

Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Thu Oct 07, 2010 12:49 pm

I have a challenge with the SSL portion of the walled garden. It does fine for a while, then it stops letting the connections through. I have a request in to mikrotik support about how the walled garden determines whether to bypass an ip with a SSL domain name in the walled garden. I will post the results here for you.

As I understand the SSL protocol, the browser resolves the domain to an ip, and gets a certificate. After that, the URL is encrypted on a SSL connection packet, so it can't be retrieved by the router. Presently, I use ips in "/ip hotspot walled-garden ip" to avoid the connection drop. ADD: Using the ips works well! No problems even after 2 years.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Walled Garden and SSL sites intermittent problem

Thu Oct 07, 2010 3:57 pm

I only use the IP for SSL sites as a workaround. The Hotspot servlet sometimes seems to have issues to correlate previous DNS requests with HTTPS requests, and as you said it cannot possibly see the requested domain in the HTTP header as that is encrypted.
 
poinths
newbie
Topic Author
Posts: 29
Joined: Tue May 09, 2006 5:52 am

Re: Walled Garden and SSL sites intermittent problem

Thu Oct 07, 2010 8:10 pm

Thanks! Looking forward seeing the reply from Mikrotik.

Well, from my understanding, the domain name is never in the IP header, as the IP header only knows about IP addresses. The translation from domain name to IP address is done by the good old DNS before sending any packets.
SSL/TLS encrypts on the Transport Layer and the IP header (Network Layer) should not be affected.

Yes, I know that adding the IP addresses in the 'Walled Garden IP List' works fine, but what you gonna do when you are using e.g. PayPal and their paypalobjects.com domain resolves into all kind of different IP addresses, which seem to be different in different regions of the world.

Did some further tests and it seems that it is not just the Godadddy cert. Had the same problem with the Verisign cert, but not with digicert.

Well, it seems I have to upgrade my PayPal account to the Pro version and spend extra 30 bucks a month to avoid this problem.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Thu Oct 07, 2010 9:24 pm

I have the same challenge with authorize.net, so paying more is not always the best thing to do. You might want to wait a day or so to see what the MT team says.

ADD: As I suspected...with a little experimentation...using nslookup on www.paypal.com returns 4 servers. Every time you repeat the nslookup, the order of the servers change. Your odds are only one in four that the top server is the one you are using.

And wouldn't it be nice to do a "/ip hotspot walled-garden ip print all" and see the ip addresses that are being used (bypassed) for each domain name in the walled garden? :D
 
poinths
newbie
Topic Author
Posts: 29
Joined: Tue May 09, 2006 5:52 am

Re: Walled Garden and SSL sites intermittent problem

Fri Oct 08, 2010 3:14 pm

I have the same challenge with authorize.net, so paying more is not always the best thing to do. You might want to wait a day or so to see what the MT team says.

ADD: As I suspected...with a little experimentation...using nslookup on http://www.paypal.com returns 4 servers. Every time you repeat the nslookup, the order of the servers change. Your odds are only one in four that the top server is the one you are using.

And wouldn't it be nice to do a "/ip hotspot walled-garden ip print all" and see the ip addresses that are being used (bypassed) for each domain name in the walled garden? :D
Well, with authorize.net, just like with PayPal Website Payments Pro, the buyer does not have to leave your own payment pages. Therefore your own site with SSL will most likely have always the same IP address and can be added to the Walled Garden IP List.
Yes, nslookup will turn up with the same IP addresses on consecutive lookups for paypal.com. But first, PayPal uses several domain names for their payment page and secondly, they have different IP addresses depending on your location (e.g. country). And it seems every so often these addresses change, making it difficult using PayPal Website Payments Standard for 'walled Garden' type sites (hotspots).

Yes, A "/ip hotspot walled-garden ip print all" would be nice.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Fri Oct 08, 2010 3:26 pm

I see where you are going. You could let your server handle the connection with PayPal, and all you need is the "yes or no" from your server.
I use authorize.net to handle my payment pages (SIM).

But this does not correct the challenge with the walled garden. I am still interested on how the hotspot knows to allow an ip through (bypass) using a domain name in the walled-garden. Is it a reverse nslookup on the ip? Another nslookup on the domain names in the walled-garden? The dns cache? Some or all of those? :?

This is not new. If you search previous posts, you will see my first report of this problem in July 2008.

ADD: If it uses dns cache, bad choice. Like I said, PayPal uses the dns to rotate the server ips. The same ips show up, but in a different order! The dns cache only stores one ip of the four available.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Walled Garden and SSL sites intermittent problem

Fri Oct 08, 2010 4:31 pm

This is purely conjecture on my part. I would love to hear a developer weigh in.

I think the walled garden decides normal HTTP transactions by just listening to the HTTP request. All Hotspot HTTP connections, authenticated and unauthenticated, by default get proxied to the Hotspot servlet. Because it's a destination NAT redirect the client thinks it's really talking to the server, and would issue a normal HTTP transactions. All clients nowadays enumerate the host in the HTTP request, and the path of course is part of it, so the Hotspot servlet can simply look at the request and determine the host and path from there, and then either (for unauthenticated users) fetch the real site as a proxy and send it back to the client, or throw a redirect to the login page.
Of course that doesn't work for HTTPS, so I think it would do DNS snooping (all DNS also gets redirected to the Hotspot servlet by default) and remember that a host just did a lookup for a name that resolved to a certain IP, and now is trying to connect to TCP/443 on the IP address that was listed in the DNS reply. At that point you can no longer match by path, I can't see how that would ever be possible for HTTPS as the path is part of the encrypted request. You also have a problem when the servlet only snoops one of multiple IP addresses and the client picks a different one, or if the client still has the DNS name cached from before attaching to the Hotspot, or when the SSL site is accessed by IP address (rare because certs can't match IPs), or a number of other different scenarios.

I always bypass the DNS redirect anyway, so I always list SSL servers that need to be reachable in the walled garden by IP address rather than host name. All SSL transactions for me are brokered by a server I own (credit card transactions etc.) so that one server is very easy to list by IP, just like poinths described. This isn't too hard to do and enables a few other neat things, like being able to use that server for any number of Hotspots that are all configured basically the same with any changes to the Hotspot infrastructure being completely centralized.

I'm hoping a dev weighs in, but they might consider the inner workings of the Hotspot something they don't want to post about.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Fri Oct 08, 2010 8:06 pm

I just received an email from Sergejs requesting more info about the problem. I explained it as well as I could. It is "quitting time" there, so I expect it will be Monday before I hear anything else. Good with me.

BTW, Sergejs verified that "/ip dns" is how the hotspot decides. I will assume (OMG! :shock: ) that means an ip must be in "/ip dns cache all". No?

ADD: I just checked "/ip dns cache" with PayPal. http://www.paypal.com has 4 ips each with a TTL of 4 minutes. That is all you have until the ips will not go through, unless someone else does another dns request for paypal after that.

ADD2: After another check, the www.paypal.com TTL is less than 4 minutes. I have gotten TTLs as short as 16 seconds!
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sat Oct 09, 2010 4:13 pm

If you would like to help me troubleshoot this, you can run this test locally. Maybe it is only certain areas that will have this trouble. The www.paypal.com dns TTL should be very short, so you gotta look quick.

/ip dns cache
print
:put [:resolve www.paypal.com];
print

After the first print, note if www.paypal.com has any entries. Then do the resolve. Another print and look for www.paypal.com entries and note the TTL. Mine are 4 minutes or less. When the TTL reaches 0, the entry disappears, and no more walled garden for paypal.

If you have trouble with other domains, try those with this also. They may have the same type dynamic dns servers.

ADD: Any daring PayPal users want to try a script? It resolves www.paypal.com, removes old www.paypal.com entries from "/ip hotspot walled-garden ip", then adds new ips. I have tested this on the main pages. I did not make a payment, but there seems to be nothing stopping it now.
:resolve www.paypal.com;

:global paypalips [/ip dns cache find name=www.paypal.com];
:global oldips [/ip hotspot walled-garden ip find dst-host=www.paypal.com];

:local thisip none;

:foreach x in=$oldips do={
    /ip hotspot walled-garden ip remove $x;
}

:foreach i in=$paypalips do={
    :set thisip [/ip dns cache get $i address];
    /ip hotspot walled-garden ip add dst-host=www.paypal.com dst-address=$thisip;
}
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 12:36 am

I wrote a script a few weeks ago that basically searches the DNS cache and adds an address list including all matched items. It could probably be extended to the hotspot walled garden entries as well. I'll do some tests and see what I can come up with.

The script is on the Wiki here:
http://wiki.mikrotik.com/wiki/Sync_Addr ... _DNS_Cache

Edit: On second thought, you might be able to use the straight script as it is with address lists. Then create a pre-hotspot rule in NAT that says any traffic going to the IPs in the address list action=accept. This way, they're not even handled by the hotspot at all.
This might actually save a lot on cpu load as well, as the hotspot isn't doing so much work.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 1:10 am

(snip) Edit: On second thought, you might be able to use the straight script as it is with address lists. Then create a pre-hotspot rule in NAT that says any traffic going to the IPs in the address list action=accept. This way, they're not even handled by the hotspot at all.
This might actually save a lot on cpu load as well, as the hotspot isn't doing so much work.
Now that is interesting. :) I'll have to play with that. If this is the "hack" for dns cache short TTLs, then that would probably be more efficient.

ADD: But with the way the script is now, I get what I wanted above. I wanted to be able to do a "/ip hotspot walled-garden ip print" and see what is being bypassed.
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 1:53 am

On third thought... I was looking into the walled-garden, and it looks like it's NOT part of the hotspot process itself, but rather just a set of firewall rules (filter and nat).

Does this seem correct?

@SurferTim,
Yuup, your script looks like it'll work good.
 
poinths
newbie
Topic Author
Posts: 29
Joined: Tue May 09, 2006 5:52 am

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 2:13 am

Well, I did the
/ip dns cache
print
:put [:resolve http://www.paypal.com];
print
And I got more or less always the same 4-8 PayPal addresses. I tested this in 4 different countries.
The TTL was always quite short.
Anyhow, I do not really see that the TTL life time is related to my actual problem.
The http://www.paypalobjects.com might be of more interest in this regard as the TTL is about 30 seconds and I get one IP address, but different ones with a few retries after the IP is cleared from the cache.
E.g.
:put [:resolve http://www.paypalobjects.com];
4 e120.g.akamaiedge.net 184.84.64.146 0s
4 e120.g.akamaiedge.net 69.192.160.146 19s
7 e120.g.akamaiedge.net 184.86.160.146 17s
3 e120.g.akamaiedge.net 184.85.16.146 12s

As soon as I try to visit a site, a DNS request is send and then cached in DNS cache.
Despite that the https domain I try to visit is correctly listed in DNS cache, I am unable to reach the site.
As soon as I disable the hotspot server, I can reach the https site without any problems.

Here again my simply test setup:
- Configure a hotspot setup (I use a remote RADIUS server, but I think it doesn't matter)
- Add e.g. *.onlinewellnessassociation.com to the Walled Garden List
- Visit http://www.onlinewellnessassociation.com and click on the Login button (redirecting to https:...)
As soon as I try to reach the https page, I get an error message and as soon as I disable the hotspot server, I get through.

DNS cache:
4 onlinewell... 67.228.27.22 3h50m33s

After I add 67.228.27.22 to the Walled Garden IP List I am able to reach the https pages.
When I disable the Walled Garden IP List entry, I get again an error.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 2:34 am

DNS cache:
4 onlinewell... 67.228.27.22 3h50m33s
Don't know what the whole domain name is, but looks like onlinewellnessassociation.com. Try https://onlinewellnessassociation.com and that is what is needed in "/ip hotspot walled-garden". It must match exactly unless you use wildcards or regular expressions in the walled-garden.
onlinewellnessassociation.com (dns cache) does not equal www.onlinewellnessassociation.com (walled-garden?)

ADD: I am thinking about the paypalobjects challenge. Like I said, I only did basic webpage nav there. Here is a script that picks up all www.paypalobjects.com ips. Schedule it to run every 20 seconds.
:global ppobjip [:resolve www.paypalobjects.com];
:local paypalobject [/ip hotspot walled-garden ip find dst-host=www.paypalobjects.com];
:local thisip none;
:local noip true;

:foreach i in=$paypalobject do={
    :set thisip [/ip hotspot walled-garden ip get $i dst-address];
    :if ( $thisip = $ppobjip ) do={
        :set noip false;
    }
}

:if ($noip) do={
    :log info "paypalobj script adding $ppobjip";
    /ip hotspot walled-garden ip add dst-host=www.paypalobjects.com dst-address=$ppobjip;
}
Within a minute or so, you should see your current www.paypalobjects.com ips in the "/ip hotspot walled-garden ip". It also inserts a log entry every time it adds an ip. Actually, it is both ips for me. There are only two it is issuing here.

OK, after several minutes, I picked up two more....and two more
 
poinths
newbie
Topic Author
Posts: 29
Joined: Tue May 09, 2006 5:52 am

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 8:46 am

I am using winbox and I cannot use https://onlinewellnessassociation.com in the Walled Garden List as Dst-Host (it's host, not URL). While it allows this entry, it simply does not work. I added *.onlinewellnessassociation.com (or http://www.onlinewellnessassociation.com) and this works for the http pages of the site.
I can add the Dst-Port 80 and 443, but that does not change anything.

If I have another site not using the Godaddy standard SSL cert, it all works fine most of the time.
If I e.g. add *.digicert.com into the Walled Garden list, I can visit http://www.digicert.com and https://www.digicert.com without any problems. I only use http://www.onlinewellnessassociation.com as an example because they use the Godaddy Std cert. and I am using the Godaddy Std SSL cert for my site too.
I still think that it is SSL certificate related. But again, once the SSL site has a single IP address and I add this IP to the 'Walled Garden IP' list all works fine. But as mentioned, PayPal is using a whole bunch if changing IP addresses for a number of domains just for the payment page (e.g. http://www.paypal.com, http://www.paypalobjects.com, paypal.112.2o7.net, securepics.ebaystatic.com .... and occasionally other domains for e.g. surveys like secure.opinionlab.com, ....mediaplex.com)

Is there anybody who can confirm my results? ... Simply add Dst.-Host *.onlinewellnessassociation.com to the hotspot 'Walled Garden' and then go to http://www.onlinewellnessassociation.com (should be successful) and then click on the Login button on that page ... which should redirect you to the https: page, which results in an error on all RouterOS boxes I have tested so far.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 1:47 pm

Both http://onlinwellnessassociation.com and https://onlinewellnessassociation.com pass through the walled garden, but ONLY if I use onlinewellnessassociation.com in the walled garden. Note no "www." prepended to either url!

ADD: If you want to use www.onlinewellnessassociation.com, you need to adjust the dns servers for your domain to respond with that (an 'A' record). Right now, it responds with this:
www.onlinewellnessassociation.com CNAME onlinewellnessassociation.com
 
poinths
newbie
Topic Author
Posts: 29
Joined: Tue May 09, 2006 5:52 am

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 9:15 pm

Well, I use the wildcard character * in front of the domain name, e.g. *.onlinewellnessassociation.com, which should cater for www and all other hostnames.
The domain onlinewellnessassociation.com is not my domain. I only use this domain as an example since they use the godaddy standard SSL cert, the same cert I use for some of my sites.
http://www.onlinewellnessassociation.com works fine with my Walled Garden when using *.onlinewellnessassociation.com

Anyhow, I think you are somehow on the right track. The problem might be CNAME related ...
I abandoned the use of the wildcard character and added the following in the Walled Garden:
onlinewellnessassociation.com
www.onlinewellnessassociation.com
With these entries I get the correct results .... which mean I can visit http://www.onlinewellnessassociation.com and http://onlinewellnessassociation.com and https://www.onlinewellnessassociation.com and https://onlinewellnessassociation.com

... will check this out with PayPal domains now

OK, I added the following entries into the Walled Garden in order to allow payments via PayPal Web Payments Standard:
www.paypal.com        
www.paypalobjects.com       
paypal.112.2o7.net
e120.g.akamaiedge.net 


And it seems to work (most of the times) at least from my site here...
I presume I have to add some more hosts/domains for PayPal, but the basic host/domain combination seems to work now.
Will dig a bit more ...
Last edited by poinths on Tue Oct 12, 2010 1:20 am, edited 7 times in total.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 9:23 pm

That last part is good to know. Both entries together did it.
I have only heard questions from support. When I get a statement from them, I'll post it.
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 11, 2010 10:01 pm

just a note, you can use <> tags to post exact code and phpbb won't mess with it. now back to the topic...
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Tue Oct 12, 2010 2:43 pm

www.paypalobjects.com and e120.g.akamaiedge.net have the same ip and TTL here. It is good for less than 20 seconds. Then it drops from the cache. If you (or a client) do another dns request immediately following the drop, it returns a new (different) ip. Now the old (previous) ip issued just seconds before will not pass through the hotspot. I explained this to support, and have not heard anything yet.

From my understanding of the walled garden, the destination ip of the packets must be in the dns cache list, and associated with a domain name to bypass the hotspot with a domain name. Twenty seconds after the dns request, those conditions are not met. Is there something else I am missing??

ADD: The intermittent part is: If you or a client does another dns request 40 seconds later, the old ip will now bypass the hotspot again. But the new ip won't until another client does another dns request 40 seconds later. Did I mention the ip of www.paypalobjects.com is one of two ips, changing every 20 seconds. It just flip-flops between the two. Then after a few hours, the two ips change, but still flip-flop between those two every 20 seconds.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Wed Oct 13, 2010 7:47 pm

EDIT: It did not fail, but the "/ip hotspot walled-garden ip" removal does not remove the entry from "/ip hotspot walled-garden" as a dynamic entry, and also leaves the entry in "/ip firewall nat". Use this at your own risk for now.

EDIT oct/14/2010: I am talking to support about the duplicate entries. They are looking into it. Otherwise, it is working great. Has not failed to bypass to paypal in two days now. I had to add one more domain in walled garden. The change is below.

Start of original post:

I used this code today without a single fail. Maybe you will have the same luck. I generated the PayPal standard account button and had no problem navigating to my payment page. I could log in but PayPal will not allow me to make a payment to and from the same account.

I used only these in
/ip hotspot walled-garden
add dst-host=www.paypal.com
add dst-host=www.paypalobjects.com

I entered this script as paypal. Run it once before you use paypal. Then schedule it once a day around 23:30:00 (11:30PM). Updates www.paypal.com ips and removes unused www.paypalobjects.com ips.
:local today [/system clock get date];
:local old [/ip hotspot walled-garden ip find dst-host=www.paypalobjects.com];

:local thisrem none;
:local thisip none;

:foreach i in=$old do={
    :set thisrem [/ip hotspot walled-garden ip get $i comment];

    :if ($thisrem != $today) do={
        /ip hotspot walled-garden ip remove $i;
    }
}

:resolve www.paypal.com;

:global paypalips [/ip dns cache find name=www.paypal.com];
:global oldips [/ip hotspot walled-garden ip find dst-host=www.paypal.com];

:foreach x in=$oldips do={
    /ip hotspot walled-garden ip remove $x;
}

:foreach i in=$paypalips do={
    :set thisip [/ip dns cache get $i address];
    /ip hotspot walled-garden ip add dst-host=www.paypal.com dst-address=$thisip;
}
And I added this as paypalobj. Schedule it every 20 seconds. It adds any new www.paypalobjects.com ips it finds. You'll need to remove the word wraps in a couple lines.
:global ppobjip [:resolve www.paypalobjects.com];
:local paypalobject [/ip hotspot walled-garden ip find dst-host=www.paypalobjects.com];
:local thisip none;
:local noip true;

:foreach i in=$paypalobject do={
    :set thisip [/ip hotspot walled-garden ip get $i dst-address];
    :if ( $thisip = $ppobjip ) do={
        :set noip false;
        /ip hotspot walled-garden ip set $i comment=[/system clock get date];
    }
}

:if ($noip) do={
    :log info "paypalobj script adding $ppobjip";
    /ip hotspot walled-garden ip add dst-host=www.paypalobjects.com dst-address=$ppobjip comment=[/system clock get date];
}
My only concern is the additional entries in "/ip hotspot walled-garden". When the old unused www.paypalobjects.com entries are deleted from "/ip hotspot walled-garden ip", it appears to leave some kind of entry there.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sat Oct 16, 2010 3:19 pm

Just a weekly update. :?

If you use PayPal to collect money, I know now what makes the connection fail. I know the symptoms. First, you normally get a "connection cannot be established" message on your browser when you click the PayPal "Buy" button. Next, the "Buy" button will be a red 'x' with the same response if you click on it. ADD: One of the best fails I have been able to create is the PayPal payment page that was created by a third grader. If you time it just right, the browser can download the page, but will be unable to load the Cascaded Style Sheet (CSS).

First, the good part. :D I have not had a single problem going to PayPal since I started running this script.

Next, the bad part. :( The bug creating the duplicate dynamic entries has not been corrected. The duplicate dynamic entries will certainly crash my test router. It is only a matter of time. Even with only 17 'static' entries in "/ip hotspot walled-garden ip", I now have over 400 dynamic entries in "/ip firewall filter", with no way of getting rid of them. A reboot does not do it. And the count goes up about 50 a day.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Fri Oct 22, 2010 5:39 pm

I just heard from Maris from support. The console on V3.30 is crashing, at least with this code. I must leave this version on this router for backup compatibility. I am ordering another router today. I will try this code on the new router. It will already have V4.x.

But even with the duplicate dynamic entries, not a PayPal fail yet! :D

ADD: Upgraded to V4.11. No change. Still duplicating dynamic entries.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Mon Oct 25, 2010 3:24 pm

OK! Now it works with no duplicate dynamic entries, thanks to Maris at support. You can't use "dst-host" and "dst-address" in the same entry in "/ip hotspot walled-garden ip". In V5.x, you will not be able to use both in the same entry. The scripts are in the wiki if you want to give it a try. Using these scripts, I have no fails to PayPal through the walled garden.
http://wiki.mikrotik.com/wiki/PayPal_wi ... den_bypass
 
someuser
Member Candidate
Member Candidate
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Walled Garden and SSL sites intermittent problem

Sat Nov 13, 2010 10:02 pm

OK! Now it works with no duplicate dynamic entries, thanks to Maris at support. You can't use "dst-host" and "dst-address" in the same entry in "/ip hotspot walled-garden ip". In V5.x, you will not be able to use both in the same entry. The scripts are in the wiki if you want to give it a try. Using these scripts, I have no fails to PayPal through the walled garden.
http://wiki.mikrotik.com/wiki/PayPal_wi ... den_bypass
Wow, Thanks Tim,
This is great news. I didn't know where to start :? . I've been getting customers with intermittent failed attempts at making payments via PayPal.
I'd called PayPal support. Of course they didn't know what to suggest.

I'm going to run your script tonight.
I'll try the fix.

P.S.
How's the Shark population in Florida?
Last edited by someuser on Sun Nov 14, 2010 6:37 am, edited 2 times in total.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sat Nov 13, 2010 11:08 pm

Hey oceanwifi! The problem was a bit difficult to find. It is a time-related issue. I know it sounds a bit backwards, but the PayPal problem is worse with fewer customers or, like me, at 2am with one person trying to purchase. If they hesitiate after going to the PayPal purchase page, like trying to go to another site. You know, try to hack by the login page. :D If they wait/try more than 5 minutes, they are doomed. The PayPal buy button is a red "X" and the link doesn't work.

I don't know about the sharks this time of year. I am a "fair weather surfer". It is a bit cold for me right now. It will be late March before I get back in.
 
someuser
Member Candidate
Member Candidate
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 12:52 am

Oh yeah,
I can imagine now, they think they're already on the internet as soon as they get to the PayPal site. Not knowing it's "walled garden".
I should probably post something on the login page like; "move right along now folks or you ain't getting on".
So, I've yet to load the fix you've come up with.

I'll give it a go.

Thanks
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 1:14 am

I have been in contact with support about this several times. I think they may actually believe me now.

What I am hoping is a remake of the walled garden routine. I think the best would be to have something like
"/ip hotspot walled-garden address-list".
When the original dns request is made from any client behind the hotspot that matches a domain in "/ip hotspot walled-garden", it is inserted into the address-list for 1 day. Any ip in this list can bypass the hotspot. No need for my script. Great with me! :D
 
someuser
Member Candidate
Member Candidate
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 2:14 am

Really an incredible piece of work there SurferTim!
You're saving alot of people (if they use this) alot of money.
Who knows how many people just give up and walk away.
I've been getting quite a few people telling me they can't make the PayPal deposit. I have to add them manually then send them a PayPal request for money!

Geez, what's it take for them to listen to you?
Upside is you've fixed it!
Thanks so much!
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 3:21 pm

(snip) Who knows how many people just give up and walk away. (snip)
And how many internet-savvy users (like me, and probably you) won't pay at all after that? They reason that if you can't even collect their money without a problem, why should they trust the rest of your services? :( Bad news! And nothing spreads faster than bad news in a resort vacation community. Well, except maybe "something for free". :lol:
 
someuser
Member Candidate
Member Candidate
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 4:31 pm

(snip) Who knows how many people just give up and walk away. (snip)
And how many internet-savvy users (like me, and probably you) won't pay at all after that? They reason that if you can't even collect their money without a problem, why should they trust the rest of your services? :( Bad news! And nothing spreads faster than bad news in a resort vacation community. Well, except maybe "something for free". :lol:
Excellent point. I' know I wouldn't think the operation (Hotspot) was very professional if they couldn't manage the payments.
I'd walk.

Interestingly, a woman called the other day to tell me she couldn't get past the PayPal site.
She wanted to get on badly enough to call. She'd queried me as to the security and how long I'd been up and running.

Again, between you, the guy that originally posted this issue, fewi and others, this was a really smart fix (is it temporary) to an obviously very difficult problem.

BTW. I added the script yesterday. So, it's now running and, yep, I got a new customer early this morn. So far no problems.

Very Cool SurferTim!
Hope your compensated Well! :)
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 4:40 pm

Interestingly, a woman called the other day to tell me she couldn't get past the PayPal site.
Actually, she couldn't complete the payment at PayPal, because she too, had waited longer than 5 minutes before clicking the "submit" button on the payment page. A couple minutes of hacking and a few minutes finding her purse and credit card, then filling in the form, and now she can't get through the walled garden to post the form to complete the payment.

ADD: Oh, and Santa, if you are still listening, and you think I have been a good boy, can you put the domain name the client requested in that address-list too? :D
 
someuser
Member Candidate
Member Candidate
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 10:38 pm

You know what's needed (other than your fix) is a flash timer on the signup page counting down the clock to let customer know they've got to get er done before such and such a time, or their going to be sent directly to Mikrotik support with a pre-filled out form stating they're about ready to .......
Last edited by someuser on Wed Nov 17, 2010 4:07 am, edited 2 times in total.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 14, 2010 10:44 pm

I prefer "You can't hack this hotspot. You will have to pay. Take all the time you need to figure that out!" :D
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Mon Nov 15, 2010 5:04 pm

I just got this from support. This is exactly why I use Mikrotik:
Hello Tim,
Thank you very much for your huge job and big efforts.
We have an idea to improve current walled-garden. It could be, that walled-garden
addresses are not removed from the list, but new ones are added by TTL to the
allowed table.
We will see how it will be possible to implement.
Regards,
Sergejs
 
someuser
Member Candidate
Member Candidate
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Walled Garden and SSL sites intermittent problem

Fri Nov 19, 2010 4:32 am

Can't thank you enough Tim
I'm definitely getting more "closings" now that you've helped with your script.
THANKS Very Much!
:D
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Fri Nov 19, 2010 1:18 pm

Thanks for your input. I have not received a single customer complaint about a PayPal payment failure since starting the script. :D
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Tue Nov 23, 2010 5:56 pm

EDIT: It has changed.
Hello Tim,

Currently it is done in the describe way.
IP addresses are not removed from allowed /ip dns, but only new ones are added,
when client make requests.

However, Paypal is the special case.
Could you try the rules for Paypal at v5.0rc4,


/ ip hotspot walled-garden add dst-host=":^www\\.paypal\\.com\$" dst-port=443
action=allow
/ ip hotspot walled-garden add dst-host=":^paypal\\.com\$" dst-port=443
action=allow
/ ip hotspot walled-garden add dst-host=":^content\\.paypalobjects\\.com\$" dst-
port=443 action=allow
/ ip hotspot walled-garden add dst-host=*.akamaiedge.net action=allow
/ ip hotspot walled-garden add dst-host=paypal.112.2O7.net

Regards,
Sergejs
I can't use the beta V5.0rc4. Can someone verify this?

ADD: If it works like they say, this should do:
/ip hotspot walled-garden
add dst-host=www.paypal.com action=allow
add dst-host=www.paypalobjects.com action=allow
add dst-host=*.akamaiedge.net action=allow
 
magomez
just joined
Posts: 4
Joined: Mon Mar 16, 2009 11:48 am

Re: Walled Garden and SSL sites intermittent problem

Thu Nov 17, 2011 3:20 pm

Hi,
we have been using Tim's scripts for the last year and have been working perfectly until last week, where we noticed that ppupdate script were not adding the dst-address entries in the walled garden for www.paypal.com.

At the end we realized that PayPal had changed DNS records, before, I think, they had four or five A records for www.paypal.com and from last week www.paypal.com is resolving to:

www.paypal.com. 175 IN CNAME www.paypal.com.akadns.net.
www.paypal.com.akadns.net. 9 IN CNAME wlb.paypal.com.akadns.net.
wlb.paypal.com.akadns.net. 21 IN CNAME active-www.paypal.com.
active-www.paypal.com. 260 IN A 66.211.169.65
active-www.paypal.com. 260 IN A 66.211.169.74
active-www.paypal.com. 260 IN A 173.0.84.2
active-www.paypal.com. 260 IN A 66.211.169.2
active-www.paypal.com. 260 IN A 66.211.169.14

That is, www.paypal.com --> www.paypal.com.akadns.net --> wlb.paypal.com.akadns.net --> active-www.paypal.com --> {66.211.169.65, 66.211.169.74, 173.0.84.2, 66.211.169.2, 66.211.169.14}

This was making ppupdate script to not get the final IP addresses, after several hours investigating it, I modified ppupdate script to follow the CNAMEs chain until it found A records.
It is working in a couple of hotspots since one day ago and seems to work fine, here you are the modified script:

:local today [/system clock get date];
:local dnsdata none;
:local dnstype none;
:local dnsname none;
:local logprefix "ppupdate";
:local paypalresolve;
:local nametoresolve "www.paypal.com";
:local old;
:local oldips;
:local thisrem;
:local paypalips;

### Remove old ppobj IPs from the walled garden ip list
:set old [/ip hotspot walled-garden ip find comment~"ppobj*"];
:foreach i in=$old do={
:set thisrem [/ip hotspot walled-garden ip get $i comment];

:if ($thisrem != ("ppobj $today")) do={
/ip hotspot walled-garden ip remove $i;
}
}

### Remove old paypal IPs from walled garden ip list
:set oldips [/ip hotspot walled-garden ip find comment="paypal"];

:foreach x in=$oldips do={
/ip hotspot walled-garden ip remove $x;
}

### Add current IPs to walled garden ip list
:set paypalresolve [:resolve www.paypal.com];
:log info "$logprefix: Returned from :resolve '$nametoresolve': '$paypalresolve'";
:while ($nametoresolve != "") do={
:log info "$logprefix Looking for '$nametoresolve' in dns cache";
:set paypalips [/ip dns cache all find name="$nametoresolve"];
:foreach i in=$paypalips do={
:set dnsdata [/ip dns cache all get $i data];
:set dnstype [/ip dns cache all get $i type];
:set dnsname [/ip dns cache all get $i name];
:log info "$logprefix: dns cache for '$dnsname': type=$dnstype data=$dnsdata";

if ($dnstype = "A") do={
:log info "$logprefix: Adding '$dnsdata' to walled garden ip list";
/ip hotspot walled-garden ip add comment="paypal" dst-address=$dnsdata;
}

if ($dnstype = "CNAME") do={
:set nametoresolve $dnsdata
} else={
:set nametoresolve "";
}

}
}
 
tchus
Member Candidate
Member Candidate
Posts: 111
Joined: Tue Jan 25, 2011 12:08 am

Re: Walled Garden and SSL sites intermittent problem

Thu Nov 17, 2011 3:50 pm

Thankyou Magomez!
I've been whacked since this started. Losing customers again!
I'm going to update SurferTims' script and give it a try. I can't belive nobody else has else experience this and posted anything.
 
tchus
Member Candidate
Member Candidate
Posts: 111
Joined: Tue Jan 25, 2011 12:08 am

Re: Walled Garden and SSL sites intermittent problem

Thu Nov 17, 2011 3:59 pm

You are Brilliant Magomez!
That just saved me LOTS.
 
magomez
just joined
Posts: 4
Joined: Mon Mar 16, 2009 11:48 am

Re: Walled Garden and SSL sites intermittent problem

Fri Nov 18, 2011 10:16 am

tchus thanks for the karma, my first one, ;-)

I couldn't believe that this wasn't happening to anyone else.

By the way here is a new version of the ppupdate script which limit the number of times "/ip dns cache all find name=xxx" is executed, currently limited to 10.
:local nametoresolve "www.paypal.com";
:local maxdnsres 10;
:local today [/system clock get date];
:local dnsdata none;
:local dnstype none;
:local dnsname none;
:local logprefix "ppupdate";
:local paypalresolve;
:local indexdns 0;
:local old;
:local oldips;
:local thisrem;
:local paypalips;

### Remove old ppobj IPs from the walled garden ip list
:set old [/ip hotspot walled-garden ip find comment~"ppobj*"];
:foreach i in=$old do={
    :set thisrem [/ip hotspot walled-garden ip get $i comment];

    :if ($thisrem != ("ppobj $today")) do={
        /ip hotspot walled-garden ip remove $i;
    }
}

### Remove old paypal IPs from walled garden ip list
:set oldips [/ip hotspot walled-garden ip find comment="paypal"];

:foreach x in=$oldips do={
    /ip hotspot walled-garden ip remove $x;
}

### Add current IPs to walled garden ip list
:set paypalresolve [:resolve www.paypal.com];
:log info "$logprefix: Returned from :resolve '$nametoresolve': '$paypalresolve'";
:set indexdns 0;
:while ($indexdns < $maxdnsres and $nametoresolve != "") do={
  :log info "$logprefix Looking for '$nametoresolve' in dns cache indexdns=$indexdns";
  :set paypalips [/ip dns cache all find name="$nametoresolve"];
  :foreach i in=$paypalips do={
    :set dnsdata [/ip dns cache all get $i data];
    :set dnstype [/ip dns cache all get $i type];
    :set dnsname [/ip dns cache all get $i name];
    :log info "$logprefix: dns cache for '$dnsname': type=$dnstype data=$dnsdata";

    if ($dnstype = "A") do={
      :log info "$logprefix: Adding '$dnsdata' to walled garden ip list";
      /ip hotspot walled-garden ip add comment="paypal" dst-address=$dnsdata;
    }

    if ($dnstype = "CNAME") do={
      :set nametoresolve $dnsdata;
    } else={
      :set nametoresolve "";
    }
  }
  :set indexdns ($indexdns + 1);
}
 
tchus
Member Candidate
Member Candidate
Posts: 111
Joined: Tue Jan 25, 2011 12:08 am

Re: Walled Garden and SSL sites intermittent problem

Sat Nov 19, 2011 4:54 am

Yeah, I know I can't understand why nobody else mentioned it.
It had to be a global thing and I'm sure we're not the only people using PayPal on hotspots.
:?
*&^ing PayPal. I know they could have made an effort to let one know they're changing their methods.
They're quite able and willing to send a survey/questionairre followup after one speaks with their tech support (if that's what you want to call them). They do it to me so I know they have the database of operators/wisps to have sent a heads up. Yeah right :lol:
Oh well.
Thanks again, really, that was excellent work on your part. :D
 
richedav
Member Candidate
Member Candidate
Posts: 114
Joined: Mon Dec 13, 2010 12:13 am

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 20, 2011 12:06 am

Do we still really need this script - have Mikrotik not fixed the way that the walled garden works yet?

Typically, i don't have remote access to the one site thats runnings this script and now needs updating ;-(
 
tchus
Member Candidate
Member Candidate
Posts: 111
Joined: Tue Jan 25, 2011 12:08 am

Re: Walled Garden and SSL sites intermittent problem

Sun Nov 20, 2011 4:50 am

Do we still really need this script - have Mikrotik not fixed the way that the walled garden works yet?

Typically, i don't have remote access to the one site thats runnings this script and now needs updating ;-(
MT has said a few times they're not putting any effort into UM at this time. :? Go figure.
I know I recently lost customers primarily due to PayPal changing their DNS setup. But, there is definitely some work needed done on UM regardless.
I'd get access to your site and update.
 
magomez
just joined
Posts: 4
Joined: Mon Mar 16, 2009 11:48 am

Re: Walled Garden and SSL sites intermittent problem

Mon Nov 21, 2011 1:12 pm

Do we still really need this script - have Mikrotik not fixed the way that the walled garden works yet?

Typically, i don't have remote access to the one site thats runnings this script and now needs updating ;-(
richedav, since we installed ppupdate/paypal scripts at the beginning of this year we have had around 20 purchases on a weekend, 2 weekends ago we had only 2, one on saturday and another one on sunday and we had several phone calls of clients who couldn't see paypal page.
After upgrading the script, all seems to work fine again.
 
pdf
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Sun Feb 12, 2006 11:56 pm

Re: Walled Garden and SSL sites intermittent problem

Thu Nov 24, 2011 9:27 pm

Hi All

I have the same issue since a couple of weeks. So far it's quite frustrating and annoying.

I tried the scripts, but it is not working.

The walled garden list is populated in some way, so the scripts are doing some black magic, but unfortunately there is still some piece missing.

What should I look and how can I understand which piece is missing?

Thank you
 
daitacv
just joined
Posts: 6
Joined: Sat Nov 26, 2011 6:13 pm

Re: Walled Garden and SSL sites intermittent problem

Sat Nov 26, 2011 6:19 pm

Same here, can't figure why i can't reach paypalojects.com most of the time.

I'm using magomez script and the 'paypal' script from SurferTim.
I also have some funny bugs. To make paypal.com works, I have to add dst-port=1-65000 to thoses scripts.
 
User avatar
chimaster
Member Candidate
Member Candidate
Posts: 133
Joined: Tue Feb 07, 2006 8:54 am
Location: Queenstown
Contact:

Re: Walled Garden and SSL sites intermittent problem

Thu Dec 01, 2011 12:07 pm

Seems this is the place I belong...

I've just upgraded 115 Hotspots (from 3.19 through to 4.17) and added SSL, not an Issue.

I'm dumping my config onto a virgin 5.9 RB450G and I'm having

"The Connection was Interrupted"
The connection to hqwifi.co.nz was interrupted while the page was loading.

If I disable SSL all works.


Anyone get to the bottom of this?
 
User avatar
chimaster
Member Candidate
Member Candidate
Posts: 133
Joined: Tue Feb 07, 2006 8:54 am
Location: Queenstown
Contact:

Re: Walled Garden and SSL sites intermittent problem

Thu Dec 01, 2011 12:52 pm

Downgraded to 4.17 and the problem is resolved. SSL works fine.
 
Trisc
Member Candidate
Member Candidate
Posts: 242
Joined: Sat May 29, 2004 11:24 pm
Location: Glos, UK

Re: Walled Garden and SSL sites intermittent problem

Tue Jul 10, 2012 1:11 pm

Just came across this thread. Seems a complicated solution! :shock:

The following dst-host entry

:^.*\.paypal\.com$

in the walled garden seems to work for me! Also handles PayPal mobile site which the above scripts ignore.

Use this regular expression for all secure domains you want in your walled garden.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Tue Jul 10, 2012 1:24 pm

@Trisc: That solution did not work for me. It works the first download, but after you fill out the payment page, the walled garden won't let you through. The DNS entry has a very short TTL, and is gone by the time you complete the payment page form.

I'm using Authorize.net because I could not get PayPal to work with the walled garden entry.
 
Trisc
Member Candidate
Member Candidate
Posts: 242
Joined: Sat May 29, 2004 11:24 pm
Location: Glos, UK

Re: Walled Garden and SSL sites intermittent problem

Wed Jul 11, 2012 11:18 am

Strange. It has worked fine for us for many years and we exclusively use PayPal on 10 different hotspots. Using a regular expression avoids having anything to do with DNS. It also allows redirection to secure subdomains like mobile.paypal.com if the customer is on a mobile device.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Wed Jul 11, 2012 2:16 pm

Using a regular expression avoids having anything to do with DNS.
How do you figure that? It is the DNS cache that determines if the client can go through the walled garden. The client does a DNS resolve, and the ip is put in the dns cache. The client browser does not do any more dns resolves during the transaction. The remaining communication is done with the ip the client received from the first dns resolve. If the ip entry in the DNS cache is there only 20 seconds, that is not enough time to complete a payment form. :(

It was temporarily solved with this script.
http://wiki.mikrotik.com/wiki/PayPal_wi ... den_bypass

edit: Unless something has changed, it still works this way, and I still do not use PayPal. If it has changed, then maybe someone from Mikrotik would like to add something here?

The way I see this working is when a unauth client does a port 80 or port 443 request, the walled garden does a check of the ips stored in the dns cache. If the ip is there, it gets the domain name associated with that ip (sort of a "reverse dns lookup") from the dns cache. THEN it compares that domain name with the entries, including the regular expression entries like yours. If it matches one, the request is let through. If it doesn't match any of them, then it isn't let through.

Two things can cause this to refuse to allow a client request through without logging in:
1) The ip is not in the dns cache. This is the PayPal fail.
2) The domain name associated with the ip is not in the walled garden
 
User avatar
tevolo
Member Candidate
Member Candidate
Posts: 114
Joined: Sun Mar 29, 2009 8:39 pm

Re: Walled Garden and SSL sites intermittent problem

Sun Jul 22, 2012 5:56 am

Is there a solution to the SSL problem? I'm on version 5.9 and clients have trouble accessing any https websites over the hotspot. Is there a solution for this problem?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Walled Garden and SSL sites intermittent problem

Sun Jul 22, 2012 1:12 pm

Is there a solution to the SSL problem? I'm on version 5.9 and clients have trouble accessing any https websites over the hotspot. Is there a solution for this problem?
Is this the same problem? The problem encountered in this thread applies only to unauthorized clients (not logged in) attempting to access some https sites through the walled garden, not authorized clients (logged in) having problems.
 
User avatar
tevolo
Member Candidate
Member Candidate
Posts: 114
Joined: Sun Mar 29, 2009 8:39 pm

Re: Walled Garden and SSL sites intermittent problem

Tue Jul 31, 2012 12:58 am

I'm still trying to evaluate the issue and figure out if it was isolated to one laptop (virus or computer issue), or if it occurred for several users.
 
fruiz002
just joined
Posts: 13
Joined: Fri Jan 06, 2012 1:35 pm

Re: Walled Garden and SSL sites intermittent problem

Sat Dec 22, 2012 9:36 pm

Hi guys,

I'm having exactly the same problem and I did not get yet a solution from Mikrotik. I have also tried the solutions posted here but none works. Can anybody give me a clue?

Thank you very much in advance

Regards
 
neby55
just joined
Posts: 1
Joined: Tue Oct 15, 2013 6:34 pm

Re: Walled Garden and SSL sites intermittent problem

Tue Oct 15, 2013 7:10 pm

Hi,

On my RB433, RouterOS 6.4, walled garden IP List does not works for HTTPS connections. So, I've searched and found another solution.

Generic Walled Garden in HTTPS

- in firewall > filter : (#serverIPaddress is the IP address of the server you want to be walled garden in HTTPS)
  • add an accept rule for chain "hs-unauth-to" with src-address=#serverIPaddress
    add an accept rule for chain "hs-unauth" with dst-address=#serverIPaddress
    put them at the top of rules list
- in firewall > NAT :
  • add an accept rule for chain "pre-hotspot" with src-address=#serverIPaddress
    add an accept rule for chain "pre-hotspot" with dst-address=#serverIPaddress
    put them at the top of rules list
- in IP > Hotspot > Walled Garden :
  • add mydomain.com in Dst. Host field and with action="allow"
    add www.mydomain.com in Dst. Host field and with action="allow"
    (or you can add #serverIPaddress in IP > Hotspot > Walled Garden IP list)
Now, every domain hosted on #serverIPaddress and added in Walled Garden will be accessible in HTTPS (and any other protocol, so be careful) without authentication.

Adding Paypal in HTTPS Walled Garden

Paypal often change its IP adresses, so we can use RouterOs Firewall Adress Lists to make a list.
  • - first, add dnsToAddressList script that get IP addresses from A or CNAME DNS records : http://wiki.mikrotik.com/wiki/Sync_Addr ... _A_Records
    - then, add this script you can name "paypal_address_list". It gets IP addresses for every domain in $Servers and put it in "paypal_address_list" Firewall Adress List.

    ros code

    :global ListName paypal_address_list
    :global Servers {"www.paypal.com"; "www.paypalobjects.com"; "paypalobjects.com"; "paypal.com"}
    /system script run dnsToAddressList
    - finally, just follow Generic Walled Garden in HTTPS chapter using address-list instead of address (src-address=>src-address-list, dst-address=>dst-address-list) and select "paypal_address_list" for these address-lists.
I hope I haven't miss anything and I hope this post can help

Who is online

Users browsing this forum: adrianmartin16, Bing [Bot], Qanon, Valerio5000 and 81 guests