# Integration with external login page for guess access

**URL:** https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123
**Category:** Enterprise Wi-Fi Networks
**Created:** [April 9, 2020, 4:06am UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123 "2020-04-09T04:06:14Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![voope](https://d10gw3vjmzyp8.cloudfront.net/user_avatar/community.cambiumnetworks.com/voope/32/12155_2.png) [@voope](https://community.cambiumnetworks.com/u/voope)
#### Post date: [April 9, 2020, 4:06am UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/1 "2020-04-09T04:06:14Z")

</div>

Hello,

I would like to centralize the logins from a server, for example, the user connects to wifi, and receives a form to fill in the user and password, but in all the examples I have seen so far, I realized that I should send the form by POST directly from the client to the AP Cambium, but what I would like was to send the POST via PHP from my WEB server but the answer I always have is "Error: Failed to connect to 0.0.0.0 port 880: Connection timed out ", is this model possible to work?

Attached, my php code, it works from the place where the wifi connection is being made, but it does not work from the WEB server.

best regards

- [Capture.png](https://d1okf4ta8xniw3.cloudfront.net/original/2X/1/196d971de42b1a98ac9e7d0144d023ca91887441.png) (60 KB)

---

<div class="post-metadata">

### Author: ![cireddy](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/c/22d042/32.png) [@cireddy](https://community.cambiumnetworks.com/u/cireddy)
#### Post date: [April 9, 2020, 4:57am UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/2 "2020-04-09T04:57:29Z")

</div>

hi,

your ask is post from web-server to cnPiolt AP instead of doing post from guest client to AP. If yes, this can be done. can you refer the attached intgeration document which gives sample code and packet capture content with examples.&nbsp;

- [GuestAccess WLAN with External Hotspot-2.docx](https://d1okf4ta8xniw3.cloudfront.net/original/2X/4/448fbb90a8a1669eb128b97009276f06913fc5ba.docx) (481 KB)

---

<div class="post-metadata">

### Author: ![voope](https://d10gw3vjmzyp8.cloudfront.net/user_avatar/community.cambiumnetworks.com/voope/32/12155_2.png) [@voope](https://community.cambiumnetworks.com/u/voope)
#### Post date: [April 9, 2020, 5:07am UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/3 "2020-04-09T05:07:23Z")

</div>

yes, i have this document, but my PHP script only works if the code is run from a client, if I run the code from the webserver, it doesn't work. do i need to release any port on cnpilot for the webserver to be able to send a post to it? since who is connected to it is the client (cell phone)

---

<div class="post-metadata">

### Author: ![cireddy](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/c/22d042/32.png) [@cireddy](https://community.cambiumnetworks.com/u/cireddy)
#### Post date: [April 9, 2020, 8:54am UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/4 "2020-04-09T08:54:08Z")

</div>

in the sample php code, ga\_srvr should be cnPiolt AP and it is ben set as 0.0.0.0 what os reason for this one?

can you share us,

1. final actual post message you are constructing&nbsp;

2. on ap what is the autnetication method has been selected

3. packet catpure between ap and your server shall help better&nbsp;

---

<div class="post-metadata">

### Author: ![Kunal\_Solanki](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@Kunal\_Solanki](https://community.cambiumnetworks.com/u/Kunal_Solanki)
#### Post date: [April 9, 2020, 10:20am UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/5 "2020-04-09T10:20:41Z")

</div>

Post directly from a webserver is supported when AP is managed through cnMaestro On premesis version. There is an option in WLAN guest-access configuration&nbsp;checkbox "External Portal Post Through cnMaestro" which when enabled will point the ga\_srvr\_ip in redirection query strings to the cnMaestro server IP/hostname as configured in the cnMaestro guest portal Services-\>Guest Portal "Guest Portal Hostname / IP". Under this flow all login POST requests will be sent to cnMaestro server and it will communicate to AP.

This will not work if you are using cloud version of cnMaestro to manage your devices.

---

<div class="post-metadata">

### Author: ![voope](https://d10gw3vjmzyp8.cloudfront.net/user_avatar/community.cambiumnetworks.com/voope/32/12155_2.png) [@voope](https://community.cambiumnetworks.com/u/voope)
#### Post date: [April 9, 2020, 4:08pm UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/6 "2020-04-09T16:08:55Z")

</div>

ok, let me see if I understand:

Step 1: "External Portal Post Through cnMaestro" \<= this is ok  
Step 2: "Services-\> Guest Portal" Guest Portal Hostname / IP "\<= this is ok

cnPilot IP: 172.18.79.2  
cnMaestro: 189.14.224.169 / adn169.adyl.srv.br

now should i send the post to the ip / cnMestro domain?

ex: curl [http://adn169.adyl.srv.br](http://adn169.adyl.srv.br)? and do I need to use port 880?

regards

- [Untitled.png](https://d1okf4ta8xniw3.cloudfront.net/original/2X/8/8d166a1a14fc5b863757c0443da8b6a2e3aa167c.png) (78.8 KB)
- [Capture2.PNG](https://d1okf4ta8xniw3.cloudfront.net/original/2X/1/1860bd4bcd5430d92e18942fb155fd6f975828b8.png) (57.1 KB)
- [Capture3.PNG](https://d1okf4ta8xniw3.cloudfront.net/original/2X/1/18118f82aec79d717ca76a708face3cb381fe72e.png) (116 KB)
- [Capture4.PNG](https://d1okf4ta8xniw3.cloudfront.net/original/2X/c/ccebb0c45d4d415d905e7f5dede124cfb85dd114.png) (23.9 KB)
- [Capture5.PNG](https://d1okf4ta8xniw3.cloudfront.net/original/2X/a/a56905260f80b71762eb6ebfa3f9b88650210068.png) (11.6 KB)

---

<div class="post-metadata">

### Author: ![Kunal\_Solanki](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@Kunal\_Solanki](https://community.cambiumnetworks.com/u/Kunal_Solanki)
#### Post date: [April 9, 2020, 6:54pm UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/7 "2020-04-09T18:54:31Z")

</div>

I am sorry I should have given below details in my last response itself.

For the external captive portal integration there is small change which will be required in the login/logout POST URL:

Current post on AP happens to “http…./cgi-bin/hotspot\_login.cgi”

When you configure “through-controller” for cnMaestro based the Post will happen to “[https://cnMaestroHostName/cn-ctlr/ext-guest/ga-ext-login](https://cnmaestrohostname/cn-ctlr/ext-guest/ga-ext-login)”

and [https://cnMaestroHostName/cn-ctlr/ext-guest/ga-ext-logout](https://cnmaestrohostname/cn-ctlr/ext-guest/ga-ext-logout) . Rest everything remains the same, they pick the ga\_srvr\_ip same as they do today for POST and with through-controller the value points to cnMaestro hostname/IP-Address.

An example curl request to perform login request:

curl -v -k -d "ga\_user=test\_user&ga\_pass=testing123" -X POST [https://10.140.137.40/cn-ctlr/ext-guest/ga-ext-login?ga\_ssid=testCnMaestroExtPortal&ga\_ap\_mac=00-04-56-F8-33-60&ga\_nas\_id=E400-F83360&ga\_srvr=10.140.137.40&ga\_cmac=00-24-D7-D4-2D-64&s=0HFYBNaS1V3iYZ8TE1F0gFQ7mDoxElmJXlzZ0Qxs0-ws.&ga\_Qv=fEROBR86HBgAGDEEVgQAGw4UWRUCACYVMgFPQVtZK1BfUSVGXipFVXtZQ1FLBhMUMww.](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.140.137.40%2Fcn-ctlr%2Fext-guest%2Fga-ext-login%3Fga_ssid%3DtestCnMaestroExtPortal%26ga_ap_mac%3D00-04-56-F8-33-60%26ga_nas_id%3DE400-F83360%26ga_srvr%3D10.140.137.40%26ga_cmac%3D00-24-D7-D4-2D-64%26s%3D0HFYBNaS1V3iYZ8TE1F0gFQ7mDoxElmJXlzZ0Qxs0-ws.%26ga_Qv%3DfEROBR86HBgAGDEEVgQAGw4UWRUCACYVMgFPQVtZK1BfUSVGXipFVXtZQ1FLBhMUMww.&data=02%7C01%7CKunal.Solanki%40cambiumnetworks.com%7C50925a7be13241c8feb608d64edf4186%7C0e263e36340946228ac818d993e76eb6%7C0%7C0%7C636783118165453383&sdata=pq9951SVoVVBHQ9JxF4uoRPrdhTzX6Qfr1mzxXdvPig%3D&reserved=0)

Logout request example:

curl -v -k &nbsp;-X POST [https://10.140.137.40/cn-ctlr/ext-guest/ga-ext-logout?ga\_ssid=testCnMaestroExtPortal&ga\_ap\_mac=00-04-56-F8-33-60&ga\_nas\_id=E400-F83360&ga\_srvr=10.140.137.40&ga\_cmac=00-24-D7-D4-2D-64&s=0HFYBNaS1V3iYZ8TE1F0gFQ7mDoxElmJXlzZ0Qxs0-ws.&ga\_Qv=fEROBR86HBgAGDEEVgQAGw4UWRUCACYVMgFPQVtZK1BfUSVGXipFVXtZQ1FLBhMUMww.](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.140.137.40%2Fcn-ctlr%2Fext-guest%2Fga-ext-logout%3Fga_ssid%3DtestCnMaestroExtPortal%26ga_ap_mac%3D00-04-56-F8-33-60%26ga_nas_id%3DE400-F83360%26ga_srvr%3D10.140.137.40%26ga_cmac%3D00-24-D7-D4-2D-64%26s%3D0HFYBNaS1V3iYZ8TE1F0gFQ7mDoxElmJXlzZ0Qxs0-ws.%26ga_Qv%3DfEROBR86HBgAGDEEVgQAGw4UWRUCACYVMgFPQVtZK1BfUSVGXipFVXtZQ1FLBhMUMww.&data=02%7C01%7CKunal.Solanki%40cambiumnetworks.com%7C50925a7be13241c8feb608d64edf4186%7C0e263e36340946228ac818d993e76eb6%7C0%7C0%7C636783118165453383&sdata=EDIQpyp399Zv24r2bT5MwIqSmOLyPArWDYDbCRwnUgc%3D&reserved=0)

I your case you can replace the 10.140.137.40 to be adn169.adyl.srv.br

---

<div class="post-metadata">

### Author: ![voope](https://d10gw3vjmzyp8.cloudfront.net/user_avatar/community.cambiumnetworks.com/voope/32/12155_2.png) [@voope](https://community.cambiumnetworks.com/u/voope)
#### Post date: [April 9, 2020, 7:45pm UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/8 "2020-04-09T19:45:48Z")

</div>

that was exactly what I needed, it worked!

impressive the amount of research I did and I didn't find it. you saved me, thank you very much and I hope this solution works for other people too.

Best Regards

---

<div class="post-metadata">

### Author: ![Luciano\_de\_Oliveira](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/l/278dde/32.png) [@Luciano\_de\_Oliveira](https://community.cambiumnetworks.com/u/Luciano_de_Oliveira)
#### Post date: [April 4, 2023, 6:14pm UTC](https://community.cambiumnetworks.com/t/integration-with-external-login-page-for-guess-access/66123/9 "2023-04-04T18:14:34Z")

</div>

Hi Kunal, thanks for your post.

I’m using cnMaestro cloud and in my case, i’m receiving “[us-e1-guest.cloud.cambiumnetworks.com](http://us-e1-guest.cloud.cambiumnetworks.com)” in ga\_srvr.

But when i’m try do POST [https://us-e1-guest.cloud.cambiumnetworks.com/cn-ctlr/ext-guest/ga-ext-login?](https://us-e1-guest.cloud.cambiumnetworks.com/cn-ctlr/ext-guest/ga-ext-login?)…, i’m receiving 404 status code.

Tnks  
Luciano.
