Community discussions

MikroTik App
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Hotspot

Thu Jul 19, 2012 10:27 am

Hi How to create a hotspot on VAP, with rb411ar?
 
scampbell
Trainer
Trainer
Posts: 487
Joined: Thu Jun 22, 2006 5:20 am
Location: Wellington, NZ
Contact:

Re: Hotspot

Fri Jul 20, 2012 7:13 am

Have a look at this article - http://wiki.mikrotik.com/wiki/Hotspot_server_setup

Just be sure to add an IP address to your VAP and specify the VAP as the Hotspot Interface during setup.
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sat Jul 21, 2012 10:27 am

every time i try, every thing goes in red. The VAP is attached to the bridge, could that be the problem.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sat Jul 21, 2012 2:08 pm

The VAP is attached to the bridge
What bridge? This is a RB411, right? You shouldn't need a bridge for this. You should have the wlan set as the localnet interface and the ether as the WAN interface. They should not be bridged to set up a hotspot.
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sun Jul 22, 2012 1:36 pm

Im not getting hotspot page and no internet. Under hotspot host i can see my laptop with the dhcp ip address but nothing else is happening.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sun Jul 22, 2012 3:12 pm

Do you get a redirect attempt? Does it try to load the login page and can't? If that is the case, what URL is showing in the address bar of your browser when it tries to redirect? Is it the router's ip on that interface?

You should post "/ip hotspot profile print". We'll start there.
add: I forgot about that bridge. Post "/ip address", "/interface bridge" and "/interface bridge port" also.
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sun Jul 22, 2012 6:36 pm

I disable the bridge because hotspot goes into red when enable.

Flags: * - default
0 * name="default" hotspot-address=0.0.0.0 dns-name=""
html-directory=hotspot rate-limit="" http-proxy=0.0.0.0:0
smtp-server=0.0.0.0 login-by=http-chap split-user-domain=no
use-radius=no

1 name="hsprof1" hotspot-address=10.10.10.1 dns-name=""
html-directory=hotspot rate-limit="" http-proxy=0.0.0.0:0
smtp-server=0.0.0.0 login-by=http-chap split-user-domain=no
use-radius=no

0 10.10.10.1/24 10.10.10.0 wlan2
1 192.168.0.2/24 192.168.0.0 ether1


Flags: X - disabled, R - running
0 X name="bridge" mtu=1500 arp=enabled
mac-address=00:0C:42:4B:8A:6E protocol-mode=none
priority=0x8000 auto-mac=yes admin-mac=00:00:00:00:00:00
max-message-age=20s forward-delay=15s transmit-hold-count=6
ageing-time=5m

Flags: X - disabled, I - inactive, D - dynamic
# INTERFACE BRIDGE PRIORITY PATH-COST HORIZON
0 I ether1 bridge 0x80 10 none
1 I wlan2 bridge 0x80 10 none
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sun Jul 22, 2012 6:56 pm

That part looks ok. Two more things to check. Please post these:
/ip route
/ip firewall nat

There should be a default route. There should be a srcnat or masquerade.
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sun Jul 22, 2012 7:17 pm

Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 192.168.0.1 1
1 ADC 10.10.10.0/24 10.10.10.1 bridge 0
2 ADC 192.168.0.0/24 192.168.0.2 bridge 0

Flags: X - disabled, I - invalid, D - dynamic
0 X ;;; place hotspot rules here
chain=unused-hs-chain action=passthrough to-addresses=0.0.0.0

1 ;;; masquerade hotspot network
chain=srcnat action=masquerade to-addresses=0.0.0.0
src-address=10.10.10.0/24
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sun Jul 22, 2012 7:39 pm

I use this masquerade:
/ip firewall nat
add chain=srcnat action=masquerade out-interface=ether1
Also, the routes for those ip addresses are assigned to "bridge".
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 192.168.0.1 1
1 ADC 10.10.10.0/24 10.10.10.1 bridge 0
2 ADC 192.168.0.0/24 192.168.0.2 bridge 0
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sun Jul 22, 2012 8:16 pm

I change all those setting and still no luck. any other suggestions?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sun Jul 22, 2012 9:13 pm

How did you set up the hotspot? When it asked you about the security certificate, did you select "none"? When it tries to redirect, what is the URL?
Is it http://192.168.0.1/login
Or is it https://192.168.0.1/login
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sun Jul 22, 2012 9:27 pm

I selected none.
when i try to goto google.com, i got the web page is not available with http://www.google.com in the address bar.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sun Jul 22, 2012 9:53 pm

Disable the hotspot. Can you access the internet without the hotspot?
/ip hotspot
disable 0
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sun Jul 22, 2012 9:54 pm

no i have to enable bridge to get internet.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sun Jul 22, 2012 10:15 pm

Then your setup is faulty. I suggest you start over.
/system reset

/ip address
add address=192.168.0.2/24 interface=ether1
add address=10.10.10.1/24 interface=wlan1

/ip route
add gateway=192.168.0.1

/ip firewall nat
add chain=srcnat action=masquerade out-interface=ether1

/ip dns
set servers=xx.xx.xx.xx,yy.yy.yy.yy
set allow-remote-requests=yes

/ip dhcp-server
setup
That is what I use to get started. Get that working. No bridge!
Then install the hotspot
/ip hotspot
setup
All default answers are ok except these:
masquerade network? no
security certificate? none
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Sun Jul 22, 2012 10:21 pm

should i use the gateway ip as the dns?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Sun Jul 22, 2012 10:27 pm

should i use the gateway ip as the dns?
Only if your ISP told you to use that. I don't know what kind of account you have with your ISP. If you have a static ip, you should have been issued an ip, netmask, gateway, and dns servers (normally two).

If you have a dhcp account, then all that (including dns) would be issued to the router by the dhcp server.
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Tue Jul 24, 2012 10:49 am

ok thanks i got it to work :D :D :D What does share users mean under hotspot user profile?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot

Tue Jul 24, 2012 1:35 pm

The "shared-users" setting allows more than one computer/device to log in with the same username/password. If you set "shared-users=2", then two computers could login with the same username.
 
nicmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 69
Joined: Sun Oct 03, 2010 11:36 am

Re: Hotspot

Wed Jul 25, 2012 6:00 pm

The "shared-users" setting allows more than one computer/device to log in with the same username/password. If you set "shared-users=2", then two computers could login with the same username.
Thanks again SurferTim, Is there a way to expire a session after a certain period?