coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
516 stars 258 forks source link

SSL not working #481

Open Onepamopa opened 5 years ago

Onepamopa commented 5 years ago

OS: Ubuntu 16.04 LTS 64 bit Compiled latest coova-chilli from github by using: debuild -b When connecting to https://hotspot.mydomain.com:4990/prelogin -- connection times out.

Curl returns:

Config: HS_MAXCLIENTS=65535

HS_USETAP=off HS_TUNDEV=tun0 HS_WANIF=eth0 HS_LANIF=eth2 HS_NETWORK=192.168.0.0 HS_NETMASK=255.255.255.0 HS_UAMLISTEN=192.168.0.1

HS_UAMPORT=3990 HS_UAMUIPORT=4990

HS_DNS_DOMAIN=hotspot.mydomain.com HS_REDIRDNSREQ=on HS_DNS1=192.168.0.1 HS_DNS2=94.23.xx.xxx # server real IP (also has a resolver on port 53)

HS_COAPORT=3799 HS_COANOIPCHECK=on

HS_NASID=nas01 HS_RADIUS=localhost HS_RADIUS2=localhost

HS_RADSECRET=topsecret1 HS_UAMSECRET=topsecreet2 HS_UAMALIASNAME=MyHotSpot HS_SSID="My Hotspot" HS_NASIP=192.168.0.1

HS_UAMSERVER=$HS_DNS_DOMAIN HS_UAMFORMAT=https://\$HS_UAMSERVER:$HS_UAMUIPORT/www/login.chi HS_UAMHOMEPAGE=https://\$HS_UAMSERVER:$HS_UAMUIPORT/www/login.chi HS_UAMSERVICE=https://\$HS_UAMSERVER

HS_REDIR=off HS_REDIRSSL=off

HS_UAMUISSL=on HS_SSLCERTFILE="/etc/chilli/mydomain-wildcard.cert" HS_SSLKEYFILE="/etc/chilli/mydomain-wildcard.key" HS_SSLCAFILE="/etc/chilli/mydomain-wildcard.cacert"

HS_SESKEEPALIVE=on HS_UAMALLOWPOST=on HS_NOC2C=on

HS_DNSPARANOIA=on

HS_TCP_PORTS="80 443 3990 4990" HS_UDP_PORTS="1701"

HS_MODE=hotspot HS_TYPE=coovachilli HS_RADAUTH=1812 HS_RADACCT=1813 HS_ADMUSR=chilliadmin HS_ADMPWD=topsecret3

HS_WWWDIR=/etc/chilli/www HS_WWWBIN=/etc/chilli/wwwsh

HS_PROVIDER=Coova HS_PROVIDER_LINK=https://coova.github.io/

HS_LOC_NAME="My Hotspot" HS_LOC_AC=408 HS_LOC_CC=1 HS_LOC_ISOCC=US

HS_RAD_PROTO="chap"

Compilation (according to debian/rules): CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \ --sysconfdir=/etc --localstatedir=/var --enable-largelimits \ --enable-proxyvsa --enable-miniportal --enable-chilliredir \ --enable-chilliproxy --enable-binstatusfile --enable-chilliscript \ --enable-chilliradsec --enable-layer3 --enable-eapol \ --enable-uamdomainfile --enable-redirdnsreq --enable-modules \ --enable-multiroute --enable-extadmvsa --with-openssl --with-poll \ --enable-json --enable-libjson

antoniovalenzuela commented 5 years ago

https://github.com/coova/coova-chilli/issues/365

cheseremtitus24 commented 1 year ago

Change this: HS_REDIRSSL=off To: HS_REDIRSSL=on

I didn't know how or where it's used plus it was At times problematic. Test without it and when it works uncomment it

dkarky0 commented 1 year ago

Hi are you able to use HTTPS in uam, if yes then can you please share conf or other changes you have done to make it work.

cheseremtitus24 commented 1 year ago

load up the default file at /etc/chilli/default and rename /etc/chilli/config to /etc/chilli/config.bak

In the default file update the uplink and downlink interfaces.

Ensure the UAM urls begin with https. + Ensure both are uamuiports and not a single 1 is a uamport -- to avoid error replace with 4990

>>>>>>>>>>>>>>>>>>>>HS_UAMFORMAT=https://$HS_UAMSERVER:$HS_UAMUIPORT/www/login.chi

HS_UAMFORMAT=https://$HS_UAMSERVER:4990/www/login.chi

>>>>>>>>>>>>>>>HS_UAMHOMEPAGE=https://$HS_UAMSERVER:$HS_UAMUIPORT/www/login.chi

HS_UAMHOMEPAGE=https://$HS_UAMSERVER:4990/www/login.chi

HS_REDIR=on
HS_REDIRSSL=on # Forces redirection on e.g. https:/securesite.com to captive portal

HS_UAMUISSL=on #--> Enables ssl support on captive portal. HS_SSLCERTFILE="/etc/chilli/mydomain-wildcard.cert" HS_SSLKEYFILE="/etc/chilli/mydomain-wildcard.key"

HS_SSLCAFILE="/etc/chilli/mydomain-wildcard.cacert" # creates problems when it is not properly generated.

To properly generate you server certificate keys follow the below article link

https://www.cyberciti.biz/faq/how-to-setup-mariadb-ssl-and-secure-connections-from-clients/

Best of luck................................