Community discussions

MikroTik App
 
cadryion
just joined
Topic Author
Posts: 12
Joined: Wed Nov 03, 2004 5:38 pm

how to access to https server without login to hotspot

Mon Nov 15, 2004 9:54 am

hi,

how do i allow hotspot user to access https server without login to hotspot?

The following is what i had done,

Configure mikrotik version 2.8.18 as a hotspot gateway(10.5.6.44) using dhcp-pool method.

I had tried (refer to doc - walled garden) but not working.

/ip firewall mangle add dst-address=10.5.6.25/32 mark-flow=hs-auth


Testing
client XP obtaining hs-temp ip from mikrotik
IE6.0 URL : https://10.5.6.25/index.php
Result : Back to mikrotik hotspot login page when i should be looking at the index page of https://10.5.6.25 :(


Can someone help me pls or tell me if there is other way of doing this? :oops:
 
edzix
Member
Member
Posts: 333
Joined: Thu Jul 01, 2004 3:01 pm
Location: Latvia

Mon Nov 15, 2004 11:38 am

can you post what walled-garden rule did tou try?

Edgars
 
cadryion
just joined
Topic Author
Posts: 12
Joined: Wed Nov 03, 2004 5:38 pm

Mon Nov 15, 2004 1:58 pm

can you post what walled-garden rule did tou try?

Edgars
I didn't use any rules in walled garden.
I just used

/ip firewall mangle add dst-address=10.5.6.25/32 mark-flow=hs-auth
 
edzix
Member
Member
Posts: 333
Joined: Thu Jul 01, 2004 3:01 pm
Location: Latvia

Mon Nov 15, 2004 2:57 pm

with this rule you are just marking packets going to that host. You should add that IP in walled garden configuration.

Edgars
 
cadryion
just joined
Topic Author
Posts: 12
Joined: Wed Nov 03, 2004 5:38 pm

Mon Nov 15, 2004 4:54 pm

with this rule you are just marking packets going to that host. You should add that IP in walled garden configuration.

Edgars
Well, thanks for replying.

I tried this but still failed :(

[admin@MPPPP] ip hotspot walled-garden> print
Flags: X - disabled
# DST-HOST DST-PORT PATH ACTION
0 ^www\\.redtone\\.com$ allow
1 10.5.6.25 allow

Testing with
Before login to hotspot
1. IE6 -- http://10.5.6.25/index.php -- Good
2. IE6 -- https://10.5.6.25/index.php -- :( "The page cannot be displayed"

Can you please give an example ? That would be most helpful.
 
jarosoup
Long time Member
Long time Member
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Mon Nov 15, 2004 10:25 pm

You can't use secure sites in the walled garden :( I fought this for a long time before realizing that it doesn't work. From the Walled Garden section of the Hotspot manual:
Notes
Currently you can not place HTTPS servers inside the Walled Garden. However, there is a workaround on this. You can add a mangle rule that allows you to pass traffic to an IP address of secure web server, exempli gratia:

/ip firewall mangle add dst-address=159.148.108.1/32 mark-flow=hs-auth
Just add holes for the IP addresses to the firewall to make it work...

Mikrotik, is there any plan to make this work in the future? I'm sure there are many others (including myself) that need this feature.
 
cadryion
just joined
Topic Author
Posts: 12
Joined: Wed Nov 03, 2004 5:38 pm

Tue Nov 16, 2004 5:03 am

From the Walled Garden section of the Hotspot manual:
Notes
Currently you can not place HTTPS servers inside the Walled Garden. However, there is a workaround on this. You can add a mangle rule that allows you to pass traffic to an IP address of secure web server, exempli gratia:

/ip firewall mangle add dst-address=159.148.108.1/32 mark-flow=hs-auth
Just add holes for the IP addresses to the firewall to make it work...
Hmm...... Then my question would be... Can anyone tell me how to make use of that 'hole' we added just now? ;)
 
jarosoup
Long time Member
Long time Member
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Wed Nov 17, 2004 2:04 am

You need to add 2 firewall rules that both contain the IP of the secure server as well as the port (443): 1 rule for destination-nat with the server IP as the destination IP as well as dst-port, and the other rule in the forward chain with the same info. Source address can be just your network, or 0/0 as well as interface settings etc. This should get you there :)
 
cadryion
just joined
Topic Author
Posts: 12
Joined: Wed Nov 03, 2004 5:38 pm

Case Close : Summary of the whole Topic

Wed Nov 17, 2004 4:24 am

Thanks Jorosoup. Saviour of the day! :lol:

Now this is the summary of what all this is about.

Target : Allow new register user to assess a https webserver(10.5.6.25) to do update and activation on their own by clicking a link on the hotspot login page.

Mikrotik : local:10.5.48.1/24 public:10.5.6.44/24
Webserver : 10.5.6.25/24

Then, we open a 'hole' in the firewall by using mangle.
Notes
Currently you can not place HTTPS servers inside the Walled Garden. However, there is a workaround on this. You can add a mangle rule that allows you to pass traffic to an IP address of secure web server, exempli gratia:
/ip firewall mangle add dst-address=10.5.6.25/32 mark-flow=hs-auth

Then, we direct the traffic through that hole by the following 2 rules:
1. ip firewall rule forward dst-address=10.5.6.25/32:443 protocol=tcp action=accept
2. ip firewall dst-nat dst-address=10.5.6.25/32:443 protocol=tcp action=accept

Testing :
Click on the link to https server on the mikrotik login page (without logging in) -- https://10.5.6.25/index.php loaded. GREAT.

PS : Can somebody in MK include the last step in the documentation.This would save somebody out there a lot of time. :wink:
 
jarosoup
Long time Member
Long time Member
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Wed Nov 17, 2004 8:39 pm

Glad to help. Actually, you don't even need that mangle rule...I did leave out one detail: make sure those 2 firewall rules you add are at the top if each chain list.