[isf-wifidog] Re: Wifidog + olsr

luffy .D goodluffy at gmail.com
Sam 13 Mai 15:05:32 EDT 2006


Hi,

I made the change in the documentation pages too as it works without  any
issues, hope no one minds :)

Luffy

Message: 1
Date: Mon, 08 May 2006 18:48:57 +0200
From: laurent <laurent2b_wlan at yahoo.fr>
Subject: Re: [isf-wifidog] Re: Wifidog + olsr
To: WiFiDog Captive Portal <wifidog at listes.ilesansfil.org>
Message-ID: <445F7679.7040608 at yahoo.fr>
Content-Type: text/plain; charset=ISO-8859-1

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

hi

thank you for your help
your script works fine here

cheers max

luffy .D a écrit :
> 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 <http://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 <http://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 :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20060514/c0df5cc2/attachment.htm


More information about the WiFiDog mailing list