Hi Laurent,<br>
<br>
Well what i tried is to mix both the scripts togeather..unlike running the two scripts togeather.<br>
My final working script (the only script called) which is run by cron is:<br>
<br>
wifidogolsr.sh<br>
-----------------------------------------------------------------------------------------------------------------<br>
#!/bin/sh<br>
#<br>
# Script to bypass HTTP interception for traffic forwarded by OLSR<br>
# bms 9-Aug-2005<br>
# Licensed under GPL<br>
#<br>
rm -f /tmp/get_neighbors.awk<br>
cat > /tmp/get_neighbors.awk <<__HERE1__<br>
BEGIN { <br>
while("route -n"|getline) {<br>
if (/^[0-9]/) {<br>
if (0 < \$5) {<br>
if (\$3 == "<a href="http://255.255.255.255">255.255.255.255</a>") {<br>
printf "%s\n", \$1;<br>
}<br>
}<br>
}<br>
}<br>
}<br>
__HERE1__<br>
<br>
#BEGIN {<br>
# while("ip route"|getline) {<br>
# if (\$6 == "metric") {<br>
#
if (\$7 > 0) {<br>
#
printf "%s\n", \$1;<br>
#
}<br>
#
}<br>
# }<br>
# }<br>
#__HERE1__<br>
<br>
<br>
iptables -t nat -D WiFiDog_Unknown -j OlsrNeighbors 2>&1 >/dev/null<br>
iptables -t nat -F OlsrNeighbors 2>&1 >/dev/null<br>
iptables -t nat -X OlsrNeighbors 2>&1 >/dev/null<br>
iptables -t nat -N OlsrNeighbors<br>
<br>
neighbors=$(awk -f /tmp/get_neighbors.awk)<br>
<br>
for _neighbor in ${neighbors} ; do<br>
<br>
_mac=$(grep "^${_neighbor}" /proc/net/arp | awk '{print $4}')<br>
echo ${_mac}<br>
iptables -t nat -A OlsrNeighbors -m mac --mac-source ${_mac} \<br>
-p tcp --dport 80 -j ACCEPT<br>
<br>
done<br>
<br>
iptables -t nat -I WiFiDog_Unknown -j OlsrNeighbors<br>
<br>
-----------------------------------------------------------------------------------------------------------------<br>
<br>
What i have done as u see is replace the things which go into
get_neighbors.awk in the script @ <a href="http://wifidog.org">wifidog.org</a> 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 :) <br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Message: 2<br>
Date: Fri, 05 May 2006 15:28:39 +0200<br>
From: laurent <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:laurent2b_wlan@yahoo.fr">laurent2b_wlan@yahoo.fr</a>><br>
Subject: Re: [isf-wifidog] Wifidog + olsr<br>
To: WiFiDog Captive Portal <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:wifidog@listes.ilesansfil.org">wifidog@listes.ilesansfil.org</a>><br>
Message-ID: <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:445B5307.9020304@yahoo.fr">445B5307.9020304@yahoo.fr</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
hi<br>
<br>
we had the same problem here in marseille (france)<br>
and for the moment we use the two scripts, call with a crontab in the same time<br>
<br>
this is not a good solution but it's work like this<br>
and we don't known how resolve this problem<br>
<br>
cheers<br>
<br>
lo<br>
<br>
<br>
<br>
luffy .D a écrit :<br>
> Hi ,<br>
><br>
> Sorry for the late update on my little adhoc network with wifidog i was<br>
> out of internet connection for quite sometime......I tried the olsr<br>
> scripts given in the <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://wifidog.org/" target="_blank">wifidog.org</a> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://wifidog.org/" target="_blank">
http://wifidog.org</a>> page but i get and<br>
> error as i run it :<br>
> "<br>
> 00:14:BF:BA:45:F6 # this is the mac address of the node which i<br>
> connect to which is connecting to the gateway<br>
><br>
> iptables v1.3.3: Bad mac address `-p'<br>
> Try `iptables -h' or 'iptables --help' for more information."<br>
><br>
><br>
> This is when i use the scripts on the documentation site @ <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://wifidog.org/" target="_blank">wifidog.org</a><br>
> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://wifidog.org/" target="_blank">http://wifidog.org</a>>. But the original script from wireless London just<br>
> runs fine without any problems.<br>
><br>
> The differnect in both as stated in teh documentation page is the use of<br>
> ip route in the wifidog documentation page while the original script<br>
> from Bruce Simpson uses route -n.<br>
><br>
> I am not very good at understanding the scripts but i notice that the<br>
> get_neighbors.awk script which is made off the script from <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://wifidog.org/" target="_blank">wifidog.org</a><br>
> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://wifidog.org/" target="_blank">http://wifidog.org</a>> is different and does not work as compared to the<br>
> original one atleast this was the case for me.<br>
><br>
><br>
> Thanks to Wifidog and Wireless London.<br>
><br>
><br>
> Luffy<br>
><br>
><br>
><br>
> ------------------------------
<div style="direction: ltr;">------------------------------------------<br>><br>> _______________________________________________<br>> WiFiDog mailing list<br>> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:WiFiDog@listes.ilesansfil.org">
WiFiDog@listes.ilesansfil.org</a><br>> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
</a><br><br>- --<br>- ---------------------------------------------------------<br>- -----------<br>SSID: laurent2b-wlan<br>GPS: N 43.296 ; E 5.405<br>Skype: laurent2b<br>Jabber: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:laurent2b_wlan@jabber.org">
laurent2b_wlan@jabber.org</a><br>- -----------<br>- ---------------------------------------------------------<br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.2.1 (MingW32)<br><br>iD8DBQFEW1MHdWQLtHRTNy4RAv5zAJ9ccIk/cupz5k5x42Di505EC4HDtwCfa9Ia
<br>pfztCdlDn7rZoxN+/v8/BEU=<br>=JzNF<br>-----END PGP SIGNATURE-----<br><br><br>------------------------------</div>