Source code template for External Web Portal (Business Router)

TL-R600VPN( V4 ) , ER7206 , TL-ER6120( V2 V3 ) , TL-ER6020( V2 ) , ER605 , TL-ER5120( V4 ) , TL-R480T+( V9 ) , TL-R470T+( V6 )
Recent updates may have expanded access to feature(s) discussed in this FAQ. Visit your product's support page, select the correct hardware version for your device, and check either the Datasheet or the firmware section for the latest improvements added to your product. Please note that product availability varies by region, and certain models may not be available in your region.
Suitable for Authentication with external web portal on TP-Link Business Routers. If you are using the Omada Controller, please refer to FAQ2912.
Note: The keywords in Bold Italics indicate parameters that are automatically filled by the router and forwarded to the Web Portal Server.
EXTERNAL_WEB_SERVER: The IP address or Domain name (and port if necessary) of the External Web Portal Server.
GATEWAY_IP_ADD: The LAN IP address of the router.
GATEWAY_PORT: A random port by the router.
INTERFACE: The network interface of the router.
AUTH_PORT: The Portal Authentication Port.
CLIENT_IP_ADD: The IP address of the client.
CLIENT_MAC_ADD: The MAC address of the client, the format is like: AA:BB:CC:DD:EE:FF.
REDIRECT_URL: If you do not set the redirect URL after clients passing the authentication, the default redirect URL depends on the wireless clients.
This document outlines the requirements when establishing an external web portal server. Please note that External Web Portal can only be used when the authentication page is External Links.
The below picture depicts the workflow among the client, Gateway (SMB Router), External Web Portal, and the local authentication server. It will help you better understand the requirements of establishing an External Web Portal server.
1. When the clients are connected to the network and try to access the Internet, the Gateway will intercept their HTTP(S) GET requests and reply with Code 302 to redirect (Step 1 and Step 2).
3. Client sends HTTP GET request to the External Web Server with the below parameters (Step 3 and Step 4).
”http(s)://EXTERNAL_WEB_SERVER/?gw_address=GATEWAY_IP_ADD&gw_port=GATEWAY_PORT&gw_id=INTERFACE&ip=CLIENT_IP_ADD&mac=CLIENT_MAC_ADD&url= REDIRECT_URL”.
For example, “http://192.168.0.200:8080/?gw_address=192.168.0.1&gw_port=2060&gw_id=br-lan&ip=192.168.0.101&mac=94:DE:80:57:01:95&url=http://www.tp-link.com” (Step 3).
4. Client sends HTTP GET requests with the username and password to the router (Step 5).
“http://GATEWAY_IP_ADD:AUTH_PORT/ wifidog/logincheck/?user=USERNAME&pwd=PASSWORD&Submit=submit&gw_address=GATEWAY_IP_ADD&gw_port= GATEWAY_PORT &gw_id=INTERFACE&ip=CLIENT_IP_ADD&mac=CLIENT_MAC_ADD&url=REDIRECT_URL&authtype=web”.
6. Gateway communicates with the radius server (local authentication or external radius server) to verify the username and password (Step 6 and Step 7).
7. If the authentication is passed, i.e., Access-Accept is received from the radius server, the Gateway will redirect the “Success Redirect URL” or “REDIRECT_URL” decided by the clients.
Here is a simple demo for you to develop your External Web Portal working with SMB Routers. Download it.
Questa faq è utile?
Your feedback helps improve this site.
What’s your concern with this article?
- Dissatisfied with product
- Too Complicated
- Confusing Title
- Does not apply to me
- Too Vague
- Other
Grazie
We appreciate your feedback.
Click here to contact TP-Link technical support.
Questo sito utilizza i cookies per migliorare l'esperienza di navigazione, analizzare le attività online e offrire agli utenti una migliore user experience. Puoi disattivare o rifiutare il loro utilizzo in qualunque momento. Per maggiori informazioni consulta la nostra privacy policy .
Questo sito utilizza i cookies per migliorare l'esperienza di navigazione, analizzare le attività online e offrire agli utenti una migliore user experience. Puoi disattivare o rifiutare il loro utilizzo in qualunque momento. Per maggiori informazioni consulta la nostra privacy policy .
Basic Cookies
Questi cookies sono necessari per il corretto funzionamento del sito e non possono essere disattivati nel tuo sistema.
TP-Link
SESSION, JSESSIONID, accepted_local_switcher, tp_privacy_base, tp_privacy_marketing, tp_smb-select-product_scence, tp_smb-select-product_scenceSimple, tp_smb-select-product_userChoice, tp_smb-select-product_userChoiceSimple, tp_smb-select-product_userInfo, tp_smb-select-product_userInfoSimple, tp_top-banner, tp_popup-bottom, tp_popup-center, tp_popup-right-middle, tp_popup-right-bottom, tp_productCategoryType
Youtube
id, VISITOR_INFO1_LIVE, LOGIN_INFO, SIDCC, SAPISID, APISID, SSID, SID, YSC, __Secure-1PSID, __Secure-1PAPISID, __Secure-1PSIDCC, __Secure-3PSID, __Secure-3PAPISID, __Secure-3PSIDCC, 1P_JAR, AEC, NID, OTZ
Zendesk
OptanonConsent, __cf_bm, __cfruid, _cfuvid, _help_center_session, _pendo___sg__.<container-id>, _pendo_meta.<container-id>, _pendo_visitorId.<container-id>, _zendesk_authenticated, _zendesk_cookie, _zendesk_session, _zendesk_shared_session, ajs_anonymous_id, cf_clearance
Analytics e Marketing Cookies
I cookies analitici ci permettono di analizzare le tue attività sul nostro sito allo scopo di migliorarne le funzionalità.
I marketing cookies possono essere impostati sul nostro sito dai nostri partner pubblicitari allo scopo di creare un profilo di tuo interesse e proporti contenuti pubblicitari rilevanti su altri siti.
Google Analytics & Google Tag Manager
_gid, _ga_<container-id>, _ga, _gat_gtag_<container-id>
Google Ads & DoubleClick
test_cookie, _gcl_au