-
Para Casa
Modems/ Gateways
A sua porta de acesso à internet
Expansão de Rede
Forma mais fácil para expandir e melhorar a sua rede
SOHO Switches
Conexões de qualidade através de cabo de rede
Adaptadores
Equipe os seus equipamentos com um acesso Wi-Fi mais rápido
Acessórios
Tudo o que precisa para um estilo de vida conectado
-
Smart Home
Câmaras Cloud
Um olhar no que é importante
Smart Plugs
Autonomia nos equipamentos domésticos
Smart Bulbs
Luz para todas as ocasiões
-
Para Empresas
JetStream Switches
Rede com fios de alta velocidade com e sem gestão L3
Omada EAP Series
Professional business Wi-Fi with centralized management
Omada Cloud SDN
A solução Wi-Fi Cloud inteligente para redes de negócios
Pharos Wireless Broadband
Ideal para redes Wi-Fi bridge ponto a ponto de longo alcance
SafeStream Router
Secure VPNs e Gateways de balanceamento de carga para negócios
-
Para ISP
DSL
Capable of high-speed network and integrated broadband applications
LTE/3G
Maintains internet access wherever you go.
PON
The leading technology for delivering gigabit Internet services
Powerline Adapter
Transforms electrical wiring to carry the network signal.
Range Extender
Easily expand your Wi-Fi coverage.
Switches
Boosts your business network with premium performance.
Business Wireless
Takes your enterprise Wi-Fi to new levels.
Source code template for External Web Portal (Standalone Mode)
This document outlines the requirements when establishing an external web portal server. In standalone mode, External Web Portal can only be used when the portal authentication type is External Radius Server. If you are using External Web Portal function in Omada Controller mode, you can refer to FAQ916
The below picture depicts the workflow among the wireless client, Omada EAP, External Web Portal and the Radius Server. It will help you get a better understanding of the requirements for establishing an External Web Portal server.
- Wireless client is connected to the SSID of the wireless network and try to access the internet. EAP device redirects the client’s request to the external web portal by replying a HTTP response with status code 200 Found to the client. (Step 1 and Step 2)
- Client sends HTTP GET request to external web portal with parameter “target=target_ap_ip&clientMac=client_mac”. For example, 192.168.10.104/?target=192.168.10.102&clientMac=38:71:de:31:7d:67 (Step 3)
- External web portal server should be able to get the value of the target, clientMac parameters. Then external web portal server should return a page with a form. This form will collect the information of username, password, clientMac.
For example:
<form id="form" method="post">
<div><span>username:</span><input type="text" name="username"/> </div>
<div><span>password:</span><input type="password" name="password"/> </div>
<div style="display:none"><span>clientMac:</span><input type="text" id="cid" name="clientMac" /></div>
Please note that the “id” of these elements in your form should be the same as this example. The method to get the value of “username” and “password” can be defined by yourself, but the value of “cid” must be obtained from the Http Request’s URL.
(Step 4)
- The form should be POST to http://target_ap_ip/portal/auth after submit. (Step5)
- EAP communicates with radius server to verify the username and password. (Step 6 and Step 7)
- If the authentication is passed, i.e., Access-Accept is received from radius server, EAP will return a built-in success page or a predefined webpage according to the configuration. (Step 8)
The below html template is a simple demo for you to develop your External Web Portal working with EAP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form id="form" method="post">
<div><span>username:</span><input type="text" name="username"/> </div>
<div><span>password:</span><input type="password" name="password"/></div>
<div style="display:none"><span>clientMac:</span><input type="text" id="cid" name="clientMac" /></div>
<button type="submit">submit</button>
</form>
<script type="text/javascript">
var submitUrl = "http://" + getQueryString("target") + "/portal/auth";
document.getElementById("form").action = submitUrl;
document.getElementById("cid").value = getQueryString("clientMac");
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
</script>
Note: When you use External Radius Server in standalone mode, please add the external web portal to Free Authentication Policy.
A sua resposta ajuda-nos a melhorar o nosso site.