❗️Toto je původní verze internetového fóra ISPforum.cz do února 2020 bez možnosti registrace nových uživatelů. Aktivní verzi fóra naleznete na adrese https://telekomunikace.cz

Hotspot

Návody a problémy s konfigurací.
nastrel
Příspěvky: 7
Registrován: 8 years ago

Hotspot

Příspěvekod nastrel » 5 years ago

Hojte vsichni, nastavuji na Mikrotiku hotspot a mam problem s presmerovani na logovaci stranku. Hotspot mam na wifi rozhrani. Prihlaseni k wifi probehne a nasledne si spustim webovy prohlizec kde zadam napr. google.com nebo cokoliv a vysledek - stranka nenalezena. Kdyz zadam rucne domenu nebo ip adresu MK pak se mi zobrazi prohlasovaci stranka a dale uz vsechno funguje. Otazka je proc se automaticke nepresmeruje pri nacitani stranky na logovaci stranku.

Kód: Vybrat vše

/interface bridge
add admin-mac=74:4D:28:5A:A0:2A auto-mac=no comment=defconf name=bridge
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=prdelOO9 supplicant-identity=\
    ""
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX disabled=no distance=indoors frequency=auto installation=indoor \
    mac-address=84:4D:28:5A:A0:2E mode=ap-bridge security-profile=prdelOO9 ssid=MK wireless-protocol=802.11 wps-mode=disabled
/ip hotspot profile
add dns-name=test.local hotspot-address=172.16.5.1 login-by=http-chap name=hsprof1
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=hs-pool-1 ranges=172.16.5.2-172.16.5.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
add address-pool=hs-pool-1 disabled=no interface=wlan1 lease-time=1h name=dhcp1
/ip hotspot
add address-pool=hs-pool-1 addresses-per-mac=1 disabled=no interface=wlan1 name=hotspot1 profile=hsprof1
/ip hotspot user profile
add add-mac-cookie=no address-pool=hs-pool-1 !mac-cookie-timeout name=Muj rate-limit=10M/2M shared-users=10 transparent-proxy=yes
/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 comment=defconf interface=pwr-line1
/ip firewall connection tracking
set enabled=yes tcp-established-timeout=5m
/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
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=172.16.5.1/24 interface=wlan1 network=172.16.5.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=172.16.5.0/24 comment="hotspot network" gateway=172.16.5.1
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/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 comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment="masquerade hotspot network" src-address=172.16.5.0/24
/ip hotspot user
add name=admin
add name=testmk profile=Muj server=hotspot1
/system clock
set time-zone-name=Europe/Prague
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
0 x

Uživatelský avatar
reset
Příspěvky: 2902
Registrován: 17 years ago
Bydliště: intERnet

Příspěvekod reset » 5 years ago

nezkoumal jsem ten tvuj skriptik, ale problem je se SSL v pripade presmerovani
zkus to ciste na http
0 x
ERnet tady, ERnet tam, ERnet vsude kam se podivam

nastrel
Příspěvky: 7
Registrován: 8 years ago

Příspěvekod nastrel » 5 years ago

Ne bohuzel ani http nejde. Musim proste rucne zadat url adresu Mikrotiku. No nevim nedavno co jsem nastavoval na unifi slo vsechno na prvni dobrou.
0 x

Noxus28
Příspěvky: 439
Registrován: 13 years ago

Příspěvekod Noxus28 » 5 years ago

Ja by som asi v user profiles skúsil vypnúť transparent proxy.
0 x
MTCNA, MTCRE, MTCTCE a furt toho viem málo 🤓

nastrel
Příspěvky: 7
Registrován: 8 years ago

Příspěvekod nastrel » 5 years ago

Zkusil jsem reset mikrotiku do tovarniho nastaveni. Chci rozjet jen trial ucet. Zkusil jsem s volbou transparent proxy i bez ni. Bohuzel bez vysledku.

Kód: Vybrat vše

/interface bridge
add admin-mac=74:4D:28:5A:A0:2A auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX disabled=no distance=indoors frequency=auto installation=indoor \
    mode=ap-bridge ssid=MikroTik-5AA02E wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
add dns-name=t.cz hotspot-address=192.168.87.1 login-by=http-pap,trial,mac-cookie name=hsprof1 rate-limit=5M/5M trial-uptime-limit=5m \
    trial-uptime-reset=10m
/ip hotspot user profile
set [ find default=yes ] shared-users=10
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=hs-pool-1 ranges=192.168.87.2-192.168.87.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
add address-pool=hs-pool-1 disabled=no interface=wlan1 lease-time=1h name=dhcp1
/ip hotspot
add address-pool=hs-pool-1 disabled=no interface=wlan1 name=hotspot1 profile=hsprof1
/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 comment=defconf interface=pwr-line1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set allow-fast-path=no
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=192.168.87.1/24 comment=defconf interface=wlan1 network=192.168.87.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.87.0/24 comment="hotspot network" gateway=192.168.87.1
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" disabled=yes 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=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=masquerade chain=srcnat comment="masquerade hotspot network" src-address=192.168.87.0/24
/ip hotspot user
add name=admin
/ip service
set www-ssl disabled=no
/system clock
set time-zone-name=Europe/Prague
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN


Co jsem vysledoval ve firewallu tak by melo dojit k presmerovani na port 64874. Provedl jsem scan portu mikrotiku a skutecne nmap port oznaci za otevreny. Ovsem stranka se nezobrazi.
0 x