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 10.0.0.1 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
Code:
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:
Code:
Ifconfig at0 up
Ifconfig at0 10.0.0.1 netmask 255.255.255.0
Route add –net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1
Dhcpd3 –cf /etc/dhcp3/dhcpd2.conf at0
The conf files contains
Code:
option domain-name-servers 10.0.0.1;

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

ddns-update-style none;

authoritative;

log-facility local7;

subnet 10.0.0.0 netmask 255.255.255.0 {
  range 10.0.0.100 10.0.0.254;
  option routers 10.0.0.1;
  option domain-name-servers 10.0.0.1;
}
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)
Code:
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 192.168.1.1
Assuming that
dhcp server v3.1.3 on
192.168.1.1 is the router address of my main network (home net)
10.0.0.1 is the server/router address of my secondary Wnetwork (TEST)
The backtrack laptop is connected to 192.168.1.1 trough eth0 up and connected via WICD (he is 192.168.1.178 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 192.168.1.178
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,
dalla