hi every one. i have been trying to set up a soft ap for the last few days with varying degrees of success. first i tried airsnarf for about 2 days but then realised that it wouldnt put my card into ap mode! i am now using this script:-

#!/bin/bash
# airsnarf.sh
# A rogue AP setup utility.

echo "Airsnarf - A rogue AP setup utility."
echo "0.2"
echo "The Shmoo Group"
echo "------------------------------------"
# here are some variables you may want to edit
WWW_ROOT="/var/www/html"
CGI_ROOT="/var/www/cgi-bin"
LOCAL_CFG="./cfg"

# specify another config dir with a command line arg if you want
if [ $1 ]
then
LOCAL_CFG="$1"
fi

source $LOCAL_CFG/airsnarf.cfg

# create the dhcpd.conf
echo -n "Creating dhcpd.conf..."
sed s/AIRSNARF/$ROGUE_NET/g ./etc/dhcpd.src > /etc/dhcpd.conf
echo "Done."

# copy over the www stuff
echo -n "Building the captive portal..."
cp $LOCAL_CFG/html/* $WWW_ROOT
cp $LOCAL_CFG/cgi-bin/* $CGI_ROOT
chmod +x $CGI_ROOT/*
echo "Done."

# set our wireless parameters
echo -n "Setting the wireless parameters..."
ifconfig $ROGUE_INTERFACE down
wlanconfig $ROGUE_INTERFACE destroy
wlanconfig $ROGUE_INTERFACE create wlandev wifi0 wlanmode ap
ifconfig $ROGUE_INTERFACE up
iwconfig $ROGUE_INTERFACE essid $ROGUE_SSID mode master

#iwconfig $ROGUE_INTERFACE essid $ROGUE_SSID mode master

echo "Done."

# set our ip and default route
echo -n "Setting the ip address and default route..."
ifconfig $ROGUE_INTERFACE $ROGUE_GW
route add -net 0.0.0.0 gw $ROGUE_GW
echo "Done."

# restart some services
/etc/init.d/dhcp3-server restart
/etc/init.d/apache2 restart
# /etc/init.d/sendmail restart

# set up the firewall to redirect
echo -n "Setting up firewall to redirect DNS..."
echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe iptable_nat
iptables -F -t nat
iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT \
--to $ROGUE_GW
# dammit, I swear this used to work with just an OUTPUT rule...
iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT \
--to $ROGUE_GW
echo "Done."

# start the local dns resolver
echo "Starting local DNS resolver..."
chmod +x ./bin/airsnarf_dns.pl
./bin/airsnarf_dns.pl

it will make the AP no problem. and my ipod touch sees it and can connect but it wont get a ip address from it.

can any one please try the above script and see if it works on theirs. thanks in advance

Spriggsy