Community discussions

MUM Europe 2020
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Redirecting after connecting to the WiFi..

Fri Sep 27, 2019 9:16 pm

Hello!!

im using the hap lite router, and i created a hotspot
everything work just fine!
the problem is when im connected to the WiFi from an device, it does not redirect automatically to ask for user and login pass, u have to manually set it on the url to the specific dns name.
so is there a way that i can fix it?

thank you for any repsonse!!
Last edited by s0ll3kr4m on Tue Oct 01, 2019 11:52 am, edited 2 times in total.
 
zakynthoswifi
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Thu Jul 17, 2014 12:38 am
Location: Zakynthos
Contact:

Re: Redirecting after connecting to the WiFi..

Sat Sep 28, 2019 5:52 pm

Under ip>dhcp server>networks did you specified dns servers?
For me that was the problem for some devices
Ilias Theodosis
Network & Security Engineer
Cisco CCNA,CCNP,CCIE
Network Solutions Ltd.
Zakynthos, Greece
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Sat Sep 28, 2019 10:00 pm

Under ip>dhcp server>networks did you specified dns servers?
For me that was the problem for some devices
Thank you for your answer!
in the network of the hotspot i did not set anything in dns servers, should i put something there, so the redirection would happen?
 
zakynthoswifi
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Thu Jul 17, 2014 12:38 am
Location: Zakynthos
Contact:

Re: Redirecting after connecting to the WiFi..

Sun Sep 29, 2019 12:08 am

No,
under the section i told you only.
DNS under hotspot is to give to your hotspot a unique dns domain name (landing.myfasths.gr)
Ilias Theodosis
Network & Security Engineer
Cisco CCNA,CCNP,CCIE
Network Solutions Ltd.
Zakynthos, Greece
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Sun Sep 29, 2019 9:28 am

Yea I gave a dns hotspot.status but, when I'm connecting to the WiFi, the browser don't open automatically, or it doesn't go automatically to the hotspot.status, you have to type it manually.
That's my problem, I want it to happen automatically.
 
zakynthoswifi
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Thu Jul 17, 2014 12:38 am
Location: Zakynthos
Contact:

Re: Redirecting after connecting to the WiFi..

Sun Sep 29, 2019 2:04 pm

please open terminal and type
/ip dhcp-server network print
and give us the output here
Ilias Theodosis
Network & Security Engineer
Cisco CCNA,CCNP,CCIE
Network Solutions Ltd.
Zakynthos, Greece
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Sun Sep 29, 2019 3:31 pm

im getting this
/ip dhcp-server network print
Flags: D - dynamic 
 #   ADDRESS            GATEWAY         DNS-SERVER           WINS-SERVER     DO..
 0   ;;; defconf
     10.10.3.0/24       10.10.3.1                           
 1   ;;; hotspot network
     10.10.4.0/24       10.10.4.1
note:the subnet 10.10.4.0 is the hotspot
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Sun Sep 29, 2019 4:45 pm

should i also include the /ip hotspot export here ?
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Sun Sep 29, 2019 5:40 pm

heres the ip hotspot
# sep/29/2019 17:24:45 by RouterOS 6.45.6
# software id = 4L42-C3TX
#
# model = RB941-2nD
# serial number = A1C30A560349
/ip hotspot profile
set [ find default=yes ] hotspot-address=10.10.4.1 login-by=\
    http-chap,https,mac-cookie ssl-certificate=Hotspot
add dns-name=hot.spot hotspot-address=10.10.4.1 login-by=http-chap,mac-cookie \
    name=hsprof1 use-radius=yes
/ip hotspot
add address-pool=hs-pool-9 addresses-per-mac=1 disabled=no idle-timeout=none \
    interface=bridge-hotspot name=hotspot profile=hsprof1
/ip hotspot user
add name=admin password=xxxxxxxx
add comment="mark account" name=mark password=xxxxxxxx server=hotspot
add comment="welcome jimaras how are you \?" name=Jimaras password=\
    xxxxxxxxxx server=hotspot
add comment=welcome name=john password=xxxxxxxxxxxx server=hotspot
add comment="asus laptop" name=babas password=xxxxxxxxx server=hotspot
add name=Asus password=xxxxxxxxxxx server=hotspot
add name=laptopMark password=xxxxxxxxxxxx server=hotspot
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Mon Sep 30, 2019 12:51 pm

this is my all configuration file
# sep/30/2019 12:41:41 by RouterOS 6.45.6
# software id = 4L42-C3TX
#
# model = RB941-2nD
# serial number = A1C30A560349
/interface bridge
add admin-mac=74:4D:28:40:EF:59 auto-mac=no comment=defconf name=bridge
add name=bridge-hotspot
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce \
    disabled=no distance=indoors frequency=auto mode=ap-bridge ssid=\
    "Hot Spot Nasa" wireless-protocol=802.11
/interface ethernet
set [ find default-name=ether1 ] advertise=\
    10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether2 ] advertise=\
    10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether3 ] advertise=\
    10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether4 ] advertise=\
    10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
    supplicant-identity=MikroTik wpa-pre-shared-key=xxxxxxxxxxxx\
    wpa2-pre-shared-key=xxxxxxxxxx
add authentication-types=wpa-psk,wpa2-psk mode=dynamic-keys name=profile \
    supplicant-identity=MikroTik wpa-pre-shared-key=xxxxxxxxxxxxx \
    wpa2-pre-shared-key=xxxxxxxxxxxxx
/ip hotspot profile
add dns-name=hot.spot hotspot-address=10.10.4.1 login-by=http-chap,mac-cookie \
    name=hsprof1 use-radius=yes
/ip pool
add name=dhcp ranges=10.10.3.2-10.10.3.253
add name=hs-pool-9 ranges=10.10.4.2-10.10.4.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=defconf
add address-pool=hs-pool-9 disabled=no interface=bridge-hotspot lease-time=1h \
    name=dhcp1
/ip hotspot
add address-pool=hs-pool-9 addresses-per-mac=1 disabled=no interface=\
    bridge-hotspot name=hotspot1 profile=hsprof1
/interface bridge filter
# no interface
add action=drop chain=forward in-interface=*8
# no interface
add action=drop chain=forward out-interface=*8
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge-hotspot comment=defconf interface=wlan1
add bridge=bridge interface=*8
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface wireless access-list
add ap-tx-limit=40000000
/ip address
add address=10.10.3.1/24 comment=defconf interface=ether2 network=10.10.3.0
add address=192.168.1.2/24 interface=ether1 network=192.168.1.0
add address=10.10.4.1/24 interface=bridge-hotspot network=10.10.4.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1
/ip dhcp-server network
add address=10.10.3.0/24 comment=defconf gateway=10.10.3.1 netmask=24
add address=10.10.4.0/24 comment="hotspot network" gateway=10.10.4.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,1.0.0.1
/ip dns static
add address=10.10.3.1 name=router.lan
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf:  drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat comment=OpenVPN dst-address=192.168.1.2 \
    dst-port=443 protocol=tcp to-addresses=10.10.3.231 to-ports=443
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=10.10.4.0/24
/ip hotspot user
add name=admin password=xxxxxxxxxxxxxxxx
add comment="mark account" name=mark password=xxxxxxxxxxxx server=hotspot1
add comment="welcome jimaras how are you \?" name=Jimaras password=\
    xxxxxxxxxxxxx server=hotspot1
add comment=welcome name=john password=xxxxxxxxxxxxxx server=hotspot1
add comment="asus laptop" name=babas password=xxxxxxxxxxx server=hotspot1
add name=Asus password=xxxxxxxxxxxx server=hotspot1
add name=laptopMark password=xxxxxxxxxxxxx server=hotspot1
/ip route
add distance=1 gateway=192.168.1.254
add distance=1 dst-address=10.10.10.0/24 gateway=10.10.3.231
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/radius
add address=127.0.0.1 secret=xxxxxxxxxx service=hotspot
/radius incoming
set accept=yes
/system clock
set time-zone-name=Europe/Athens
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
 
zakynthoswifi
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Thu Jul 17, 2014 12:38 am
Location: Zakynthos
Contact:

Re: Redirecting after connecting to the WiFi..

Mon Sep 30, 2019 3:32 pm

im getting this
/ip dhcp-server network print
Flags: D - dynamic 
 #   ADDRESS            GATEWAY         DNS-SERVER           WINS-SERVER     DO..
 0   ;;; defconf
     10.10.3.0/24       10.10.3.1                           
 1   ;;; hotspot network
     10.10.4.0/24       10.10.4.1
note:the subnet 10.10.4.0 is the hotspot
Ok under this menu add the missing dns-server value with 10.10.4.1 as dns and you will be fine!
Ilias Theodosis
Network & Security Engineer
Cisco CCNA,CCNP,CCIE
Network Solutions Ltd.
Zakynthos, Greece
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Mon Sep 30, 2019 4:08 pm

still after adding that, the problem persists
flags: D - dynamic 
 #   ADDRESS            GATEWAY         DNS-SERVER           WINS-SERVER     DO..
 0   ;;; defconf
     10.10.3.0/24       10.10.3.1                           
 1   ;;; hotspot network
     10.10.4.0/24       10.10.4.1       10.10.4.1
when i open a http site it doesnt redirect to the login page.
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Tue Oct 01, 2019 11:21 am

anyone?
please help i really want to solve this issue, it bothers me a lot.
 
s0ll3kr4m
newbie
Topic Author
Posts: 33
Joined: Tue Sep 24, 2019 11:34 am

Re: Redirecting after connecting to the WiFi..

Tue Oct 01, 2019 1:34 pm

i have done fresh install everything but still no redirection after entering an http site.
i want the user, when entering in SSID wifi , and accessing an http site to redirect him to the login page, so he will put the credentials.
right now they see the login page only if they put 10.10.4.1 or hot.spot in the address
here is the new config file :
# oct/01/2019 13:21:26 by RouterOS 6.45.6
# software id = 4L42-C3TX
#
# model = RB941-2nD
# serial number = A1C30A560349
/interface bridge
add name=bridge-hotspot
/interface wireless
set [ find default-name=wlan1 ] disabled=no mode=ap-bridge ssid=\
    "Hot spot Nasa"
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
add dns-name=hot.spot hotspot-address=10.10.4.1 login-by=http-chap name=\
    hsprof1 use-radius=yes
/ip pool
add name=hs-pool-7 ranges=10.10.4.2-10.10.4.254
/ip dhcp-server
add address-pool=hs-pool-7 disabled=no interface=bridge-hotspot lease-time=1h \
    name=dhcp1
/ip hotspot
add address-pool=hs-pool-7 addresses-per-mac=1 disabled=no interface=\
    bridge-hotspot name=hotspot1 profile=hsprof1
/interface bridge port
add bridge=bridge-hotspot interface=wlan1
/ip address
add address=192.168.1.2/24 comment="main subnet router/modem" interface=\
    ether1 network=192.168.1.0
add address=10.10.3.1/24 comment=\
    "subnet 10.10.3.0 \E4\DF\EA\F4\F5\EF mikrotik" interface=ether2 network=\
    10.10.3.0
add address=10.10.4.1/24 comment="ip address assign to bridge" interface=\
    bridge-hotspot network=10.10.4.0
/ip dhcp-server network
add address=10.10.4.0/24 comment="hotspot network" dns-server=10.10.4.1 \
    gateway=10.10.4.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip dns static
add address=10.10.4.1 name=hot.spot
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=10.10.4.0/24
add action=dst-nat chain=dstnat dst-port=443 in-interface=ether1 \
    in-interface-list=all protocol=tcp to-addresses=10.10.3.231 to-ports=443
/ip hotspot user
add name=admin password=xxxxxxxxxxx
/ip route
add distance=1 gateway=192.168.1.1
add distance=1 dst-address=10.10.10.0/24 gateway=10.10.3.231
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/radius
add address=127.0.0.1 secret="\CE\E9\EC\E1\F1\E1\F35511" service=hotspot
/radius incoming
set accept=yes
/system clock
set time-zone-name=Europe/Athens

Who is online

Users browsing this forum: No registered users and 33 guests