[isf-wifidog] Re: Wifidog + olsr

luffy .D goodluffy at gmail.com
Lun 8 Mai 09:14:51 EDT 2006


Hi Laurent,

Well what i tried is to mix both the scripts togeather..unlike running the
two scripts togeather.
My final working script (the only script called) which is run by cron  is:

wifidogolsr.sh
-----------------------------------------------------------------------------------------------------------------
#!/bin/sh
#
# Script to bypass HTTP interception for traffic forwarded by OLSR
# bms 9-Aug-2005
# Licensed under GPL
#
rm -f /tmp/get_neighbors.awk
cat > /tmp/get_neighbors.awk <<__HERE1__
BEGIN {
while("route -n"|getline) {
      if (/^[0-9]/) {
            if (0 < \$5) {
                    if (\$3 == "255.255.255.255") {
                              printf "%s\n", \$1;
                                }
                              }
                            }
                          }
                         }
__HERE1__

#BEGIN {
#       while("ip route"|getline) {
#               if (\$6 == "metric") {
#                       if (\$7 > 0) {
#                               printf "%s\n", \$1;
#                               }
#                         }
#               }
#       }
#__HERE1__


iptables -t nat -D WiFiDog_Unknown -j OlsrNeighbors 2>&1 >/dev/null
iptables -t nat -F OlsrNeighbors 2>&1 >/dev/null
iptables -t nat -X OlsrNeighbors 2>&1 >/dev/null
iptables -t nat -N OlsrNeighbors

neighbors=$(awk -f /tmp/get_neighbors.awk)

for _neighbor in ${neighbors} ; do

   _mac=$(grep "^${_neighbor}" /proc/net/arp | awk '{print $4}')
   echo ${_mac}
   iptables -t nat -A OlsrNeighbors -m mac --mac-source ${_mac} \
            -p tcp --dport 80 -j ACCEPT

done

iptables -t nat -I WiFiDog_Unknown -j OlsrNeighbors

-----------------------------------------------------------------------------------------------------------------

What i have done as u see is replace the  things which go into
get_neighbors.awk  in the script @ wifidog.org with  the original things
that kinda makes it same..............I am not really intelligent in these
but some how thing work so i am happy :)













Message: 2
Date: Fri, 05 May 2006 15:28:39 +0200
From: laurent <laurent2b_wlan at yahoo.fr>
Subject: Re: [isf-wifidog] Wifidog + olsr
To: WiFiDog Captive Portal <wifidog at listes.ilesansfil.org>
Message-ID: <445B5307.9020304 at yahoo.fr>
Content-Type: text/plain; charset=ISO-8859-1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi

we had the same problem here in marseille (france)
and for the moment we use the two scripts, call with a crontab in the same
time

this is not a good solution but it's work like this
and we don't known how resolve this problem

cheers

lo



luffy .D a écrit :
> Hi ,
>
> Sorry for the late update on my little adhoc network with wifidog i was
> out of internet connection for quite sometime......I tried the olsr
> scripts given in the wifidog.org <http://wifidog.org> page but i get and
> error as i run it :
> "
> 00:14:BF:BA:45:F6   # this is the mac address of the node which i
> connect to which is connecting to the gateway
>
> iptables v1.3.3: Bad mac address `-p'
> Try `iptables -h' or 'iptables --help' for more information."
>
>
> This is when i use the scripts on the documentation site @ wifidog.org
> <http://wifidog.org>. But the original script from wireless London just
> runs fine without any problems.
>
> The differnect in both as stated in teh documentation page is the use of
> ip route in the wifidog documentation page while the original script
> from Bruce Simpson uses route -n.
>
> I am not very good at understanding the scripts but i notice that the
> get_neighbors.awk script which is made off the script from wifidog.org
> <http://wifidog.org> is different and does not work as compared to the
> original one atleast this was the case for me.
>
>
> Thanks to Wifidog and Wireless London.
>
>
> Luffy
>
>
>
> ------------------------------ ------------------------------------------
>
> _______________________________________________
> WiFiDog mailing list
> WiFiDog at listes.ilesansfil.org
> http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog

- --
- ---------------------------------------------------------
- -----------
SSID: laurent2b-wlan
GPS: N 43.296 ; E 5.405
Skype: laurent2b
Jabber: laurent2b_wlan at jabber.org
- -----------
- ---------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)

iD8DBQFEW1MHdWQLtHRTNy4RAv5zAJ9ccIk/cupz5k5x42Di505EC4HDtwCfa9Ia
pfztCdlDn7rZoxN+/v8/BEU=
=JzNF
-----END PGP SIGNATURE-----


------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20060508/507711c0/attachment.html


More information about the WiFiDog mailing list