[Lugro-mesh] Como hacer que Nodogsplash work
Sebastián D. Criado
lugro-mesh@lugro.org.ar
Tue, 25 Dec 2007 23:05:44 -0300
--=-QofduKLNoyVs5plMbMCS
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Me puse a a ver el tema del Nodogsplsh y me d=C3=AD cuenta despu=C3=A9s de
debuguear que estaba faltando algo.
Para ver si est=C3=A1 funcionando, solo hace falta usar el comando ndsctl
seguido de status. Aqu=C3=AD se pueden ver varias cosas, como cual es el
gateway, si permite salir inmediatamente y si se est=C3=A1 usando Traffic
Control.
root@robin:/$ ndsctl status
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
NoDogSplash Status
=3D=3D=3D=3D
Version: 0.9_beta8
Uptime: 0d 0h 2m 12s
Gateway Name: NoDogSplash
Managed interface: ath1
Server listening: 10.22.64.1:2050
Authenticate immediately: yes
Traffic control: no
Total download: 0 kByte; avg: 0 kbit/s
Total upload: 0 kByte; avg: 0 kbit/s
=3D=3D=3D=3D
Client authentications this session: 0
Current clients: 0
=3D=3D=3D=3D
Blocked MAC addresses:
none
Trusted MAC addresses:
none
=3D=3D=3D=3D=3D=3D=3D=3D
Para poder hacer un debug y ver como est=C3=A1 funcionando, se tiene que
agregar lo siguiente al archivo /etc/init.d/nodosplash
OPTIONS=3D"-f -d 7"
Esto har=C3=A1 que tire los logs por pantalla con el m=C3=A1ximo nivel de l=
og.
Se puede ver que funciona al conectarse un cliente. Lo identifica y
todo:
nodogsplash: Starting nodogsplash ...=20
Testing module ipt_mac
ipt_mac is working
Testing module ipt_mark
ipt_mark is working
Testing module ipt_REDIRECT
ipt_REDIRECT is working
Testing module imq
imq is working
Testing module ipt_IMQ
ipt_IMQ is working
Testing module sch_htb
Module sch_htb not working
Scanning disk for sch_htb module
sch_htb exists, trying to load
sch_htb loaded successfully
[6][Sat Jan 1 00:05:30 2000][1487](conf.c:502) Reading configuration
file '/etc/nodogsplash/nodogsplash.conf'
[7][Sat Jan 1 00:05:30 2000][1487](conf.c:556) Parsing opcode:
FirewallRuleSet, arg: preauthenticated-users {
[7][Sat Jan 1 00:05:30 2000][1487](conf.c:263) Adding Firewall Rule Set
preauthenticated-users
[7][Sat Jan 1 00:05:30 2000][1487](conf.c:320) p1 =3D [FirewallRule]; p2
=3D [block to 10.0.0.0/8]
[7][Sat Jan 1 00:05:30 2000][1487](conf.c:359) leftover: block to
10.0.0.0/8
[7][Sat Jan 1 00:05:30 2000][1487](conf.c:443) Adding Firewall Rule
block (null) port (null) to 10.0.0.0/8
[7][Sat Jan 1 00:05:30 2000][1487](conf.c:320) p1 =3D [FirewallRule]; p2
=3D [allow]
[7][Sat Jan 1 00:05:30 2000][1487](conf.c:359) leftover: allow
Si ven en la primer linea, dice que toma la configuraci=C3=B3n
de /etc/nodogsplash/nodogsplash.conf.std y lo que tira el ndsctl dice:
Authenticate immediately: yes
En este archivo /etc/nodogsplash/nodogsplash.conf.std hay una linea que
indica, ojo, hay otro archivo que se llama nodogsplash.conf, pero si se
lo modifica, el mismo es nuevamente puesto igual que el .std al
reiniciar, as=C3=AD que es el std el que hay que modificar.
Pasar de:
AuthenticateImmediately 1
Si se deja as=C3=AD:
AuthenticateImmediately 0
pasara a mostrar la p=C3=A1gina de splash. El tema es que la p=C3=A1gina qu=
e
supuestamente tendr=C3=ADa que estar en /etc/nodogsplash/htdocs/splash.html
no se encuentra y al reiniciar el nodogsplash con las opciones de debug
se ve que lo pide.
El archivo en cuesti=C3=B3n est=C3=A1 en los fuentes de nodogsplash, as=C3=
=AD que lo
copie al bicho y salio andando.
Lo que si, hay que cambiar los nombres de los logos, por que los que
est=C3=A1n se llaman open-mesh.png y enter.png
Yo lo arregle y quedo algo as=C3=AD:
<html>
<head>
<title>$gatewayname Entry</title>
<meta HTTP-EQUIV=3D"Pragma" CONTENT=3D"no-cache">
</head>
<body bgcolor=3D"#DDDDDD" text=3D"#000000">
<table border=3D"0" cellpadding=3D"2" cellspacing=3D"0" width=3D"100%">
<tr>
<td align=3Dcenter>
<h2>$gatewayname</h2>
</td>
</tr>
<tr>
<td align=3Dcenter height=3D"120">
<!--
A client is authenticated by requesting the page $authtarget.
So, href to it here, with an img or link text the user can
click on.
Also, note that any images you reference must reside in the
subdirectory that is the value of $imagesdir (default:
"images").
-->
<img src=3D"$imagesdir/open-mesh.png">
<a href=3D"$authtarget">
<img src=3D"$imagesdir/enter.png" width=3D"71" height=3D"49" border=
=3D"0"
alt=3D"Click to enter" title=3D"Click to enter">=20
</a>
</td>
</tr>
</body>
</html>
Saludos.-
--=20
Sebasti=C3=A1n D. Criado - scriado{en}ciudad.com.ar
NO A LA MATRICULACI=C3=93N OBLIGATORIA -
http://noalamatricula.wordpress.com/about/
L.U.G.Ro - http://www.lugro.org.ar
GNU/Linux Registered User # 146768
-------------------------------------------------------------------
"Si el Universo fuera un programa estar=C3=ADa hecho en C, y correr=C3=ADa =
sobre
un sistema UNIX"
--=-QofduKLNoyVs5plMbMCS
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
digitalmente
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQBHcbb48hmHQ8ZCg0IRAnDGAKCCB9RWZU+qtRTZ19+onKSkNUblLQCeMzTg
yPeqbP+Ehii7S4aCmJ55Yoo=
=yicG
-----END PGP SIGNATURE-----
--=-QofduKLNoyVs5plMbMCS--