feat(hotspot): login page redireciona para o portal INCTG e login por voucher no portal
build-image / build-push (push) Successful in 8m51s
build-image / build-push (push) Successful in 8m51s
This commit is contained in:
1 parent
a8c513dc2c
commit
8fab1e2ab6
3 files changed
+87
-11
No files matched your search
@@ -27,7 +27,7 @@
|
||||
/ip pool add name=guest-pool ranges=($guestIP . "10-")($guestIP . "50")
|
||||
/ip pool set [find name=guest-pool] ranges=("10.10.10.10-10.10.10.50")
|
||||
|
||||
/ip hotspot profile add name=hs-guest hotspot-interface=bridge-guest html-directory=hotspot login-by=http-chap dns-name="" comment="perfil hotspot convidados"
|
||||
/ip hotspot profile add name=hs-guest hotspot-interface=bridge-guest html-directory=hotspot login-by=cookie,http-chap,http-pap dns-name="" comment="perfil hotspot convidados"
|
||||
/ip hotspot add name=guest-hotspot interface=bridge-guest address-pool=guest-pool profile=hs-guest lease-time=1h disabled=no
|
||||
|
||||
# ===== 3. PERFIS DE PLANO (nomes devem bater com o backend) =====
|
||||
@@ -56,11 +56,23 @@ add chain=forward src-address=$guestSubnet dst-address=172.16.0.0/12 action=drop
|
||||
add chain=input src-address=$guestSubnet dst-address=$guestIP action=drop comment="guest nao gerencia o MikroTik"
|
||||
add chain=input src-address=$guestSubnet action=drop comment="guest so usa hotspot"
|
||||
|
||||
# ===== 6. WALLED GARDEN (fontes do portal antes do login) =====
|
||||
/ip hotspot walled-garden remove [find dst-host="fonts.googleapis.com"]
|
||||
/ip hotspot walled-garden add dst-host=fonts.googleapis.com action=accept comment="fontes portal"
|
||||
/ip hotspot walled-garden remove [find dst-host="fonts.gstatic.com"]
|
||||
/ip hotspot walled-garden add dst-host=fonts.gstatic.com action=accept comment="fontes portal"
|
||||
# ===== 6. WALLED GARDEN (portal antes do login) =====
|
||||
# Portal publico (Cloudflare) - necessario para o convidado abrir o portal
|
||||
# antes de autenticar. As faixas cobrem os IPs anycast usados pelo dominio.
|
||||
/ip hotspot walled-garden ip
|
||||
add dst-address=104.16.0.0/13 dst-port=443 protocol=tcp action=accept comment="pix-portal-cloudflare"
|
||||
add dst-address=172.64.0.0/13 dst-port=443 protocol=tcp action=accept comment="pix-portal-cloudflare"
|
||||
|
||||
# Portal local (fallback, caso use o backend direto na LAN)
|
||||
/ip hotspot walled-garden ip
|
||||
add dst-address=192.168.3.100 dst-port=3000 protocol=tcp action=accept comment="pix: portal pagamento"
|
||||
|
||||
# ===== 6.1 PAGINA DE LOGIN CUSTOMIZADA =====
|
||||
# Substituir hotspot/login.html e hotspot/alogin.html pelo arquivo
|
||||
# mikrotik/hotspot-login.html (redireciona para o portal INCTG).
|
||||
# Via FTP:
|
||||
# curl -T hotspot-login.html ftp://USER:[email protected]/hotspot/login.html
|
||||
# curl -T hotspot-login.html ftp://USER:[email protected]/hotspot/alogin.html
|
||||
|
||||
# ===== 7. LIMPA HOTSPOT ANTIGO (se houver) =====
|
||||
/ip hotspot user remove [find where comment~"pix"]
|
||||
|
||||
Reference in new issue
Block a user