guifi.net:hotspot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
guifi.net:hotspot [2020/04/19 22:53] – jose | guifi.net:hotspot [2020/05/03 14:32] – jose | ||
---|---|---|---|
Line 184: | Line 184: | ||
< | < | ||
- | lan0 IEEE 802.11 | + | wlan0 IEEE 802.11 |
Retry short limit: | Retry short limit: | ||
Power Management: | Power Management: | ||
Line 251: | Line 251: | ||
/ | / | ||
+ | https:// | ||
+ | ===== Radius ===== | ||
+ | Con docker, quitar ipv6 de: | ||
+ | / | ||
+ | |||
+ | Se crea un usuario de prueba en el fichero users que es un enlaces simbólico a authorize: | ||
+ | / | ||
+ | / | ||
+ | |||
+ | < | ||
+ | bob | ||
+ | Reply-Message := " | ||
+ | </ | ||
+ | |||
+ | Para poder hacer consulta que no sea desde localhost: | ||
+ | |||
+ | / | ||
+ | < | ||
+ | client private-network-1 { | ||
+ | ipaddr | ||
+ | secret | ||
+ | } | ||
+ | </ | ||
+ | Hacemos la consulta: | ||
+ | radtest bob hello 192.168.1.13 0 probando | ||
+ | | ||
+ | ===== openwrt ===== | ||
+ | / | ||
+ | option gatewayinterface ' | ||
+ | ===== FAS ===== | ||
+ | Delega la autenticación en una web externa. | ||
+ | |||
+ | Hay varios campos a configurar: | ||
+ | fas_secure_enabled | ||
+ | fasremotefqdn | ||
+ | fasremoteip | ||
+ | faspath | ||
+ | fasport | ||
+ | faskey | ||
+ | | ||
+ | |||
+ | |||
+ | Hay 4 tipos de login: | ||
+ | ==== fas_secure_enabled 0 ==== | ||
+ | |||
+ | **Petición: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | Si vamos a la url que le pasa por GET como variable **authaction** estamos logados, es decir: | ||
+ | http:// | ||
+ | |||
+ | ==== fas_secure_enabled 1 y faskey no activado ==== | ||
+ | Se envía la petición sin el token y FAS tiene que pedirlo a nodogsplah | ||
+ | |||
+ | Petición: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | ==== fas_secure_enabled 1 y faskey activado ==== | ||
+ | Envia el token en la variable hid. Si el login es correcto, tiene que devolver la petición concatenando hid con el faskey | ||
+ | |||
+ | Petición: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== fas_secure_enabled 3 ==== | ||
+ | Conecta por https. | ||
+ | |||
+ | **Nodogsplash: | ||
+ | < | ||
+ | fas_secure_enabled 3 | ||
+ | fasremotefqdn portalcaptiu.lobo99.info | ||
+ | fasremoteip 37.132.244.99 | ||
+ | faspath /login3.php | ||
+ | fasport 443 | ||
+ | faskey 1234567890 | ||
+ | </ | ||
+ | |||
+ | **login3.php** | ||
+ | < | ||
+ | <?php | ||
+ | $key=" | ||
+ | $string=$_GET[' | ||
+ | $iv=$_GET[' | ||
+ | $cipher=" | ||
+ | $decrypted=openssl_decrypt( base64_decode( $string ), $cipher, $key, 0, $iv ); | ||
+ | |||
+ | echo $decrypted; | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | Al conectar al hotspor redirige la petición por https a: | ||
+ | https:// | ||
+ | |||
+ | Envía por get la variable **fas** con el contenido encriptado con la shred-key que tenemos configurado en faskey y la variable **iv** que es una semilla. | ||
+ | |||
+ | Podemos desencriptar el contenido con el comando de php: | ||
+ | openssl_decrypt( base64_decode( $string ), $cipher, $key, 0, $iv ); | ||
+ | En este caso el resultado es: | ||
+ | < | ||
+ | clientip=192.168.220.51, | ||
+ | </ | ||
guifi.net/hotspot.txt · Last modified: 2020/05/03 15:17 by jose