Hello, I’m here after a long time because I have a strange problem with routing and forwarding.
The problem came out when I first tried to broadcast my apache on the wifi: it works but when the laptop is connected to the internet it is not shared with the connected devices.
The device is my HTC desire, and android phone; Apache and Mysql on BT runs perfectly and the website is shared trough the wifi if i use the address as URL; If i call Google the page won't load, the laptop have full internet access and I've tested it.

Here is my setup
Airmon-ng start wlan0
Airbase-ng –e “TEST” –c 9 mon0
So I have my monitor with a sort of ap running, I have to bring it completely on:
Ifconfig at0 up
Ifconfig at0 netmask
Route add –net netmask gw
Dhcpd3 –cf /etc/dhcp3/dhcpd2.conf at0
The conf files contains
option domain-name-servers;

default-lease-time 60;
max-lease-time 72;

ddns-update-style none;


log-facility local7;

subnet netmask {
  option routers;
  option domain-name-servers;
and created the DHCPD.pid in /var/run/ with the permissions for the dhcp server;
then flushing all the tables (i can't understand this part)
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface at0 -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to
Assuming that
dhcp server v3.1.3 on is the router address of my main network (home net) is the server/router address of my secondary Wnetwork (TEST)
The backtrack laptop is connected to trough eth0 up and connected via WICD (he is there)
internet works on the laptop
Internet doesn't work for the smartphone
a pc on the main network can recall the laptop server using
I cannot recall the phone since he doesn't host any server services
I must say that i have studied the routing/forwarding process and tables but that was just theory and this is a mess, I have copied those "iptables instructions" from examples... uhm... any ideas why he doesn't forwards my packets?

Best regards and tank you,