Results 1 to 3 of 3

Thread: Routing in the Access Point stuck (forwarding)

Hybrid View

  1. #1
    Just burned his ISO dallatorretdu's Avatar
    Join Date
    Jul 2010
    ITALY [TN]

    Default Routing in the Access Point stuck (forwarding)

    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 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,

  2. #2
    Senior Member VulpiArgenti's Avatar
    Join Date
    Sep 2011

    Default Re: Routing in the Access Point stuck (forwarding)

    I can see a couple of possible issues:

    1. Is kernel forwarding enabled?
    2. The name-server should be set to your home LAN address, probably The last line of the iptables is meant to forward dns requests but this might not be the best way of managing dns.

  3. #3
    Just burned his ISO dallatorretdu's Avatar
    Join Date
    Jul 2010
    ITALY [TN]

    Default Re: Routing in the Access Point stuck (forwarding)

    starting from the point 2:
    I changed my dhcp file, now it starts with
    option ddns-update-style ad-hoc;
    option domain-name-servers;
    default-lease-time 600;
    max-lease-time 702;
    now in /var/run/ everyone can create content so dhcp3 server is happy with it
    still the pc won't route my packets to the main router
    The modem says that connected to his network there is (my desktop pc) (BT5 laptop) he doesn't says anything about his routing capabilities.
    More infos
    NAPT and DHCP enabled 
    from to
    The second network starts from and it must not be the problem, the subnet mask is good until
    It is still stuck.
    you asked me "1. Is kernel forwarding enabled?"
    Well, I have googled it, after finding something about "Kernel ip forwarding", the resoult is that this wariable was setted to 0 (sysctl net.ipv4.ip_forward)
    so i have done a hot set:
    sysctl -w net.ipv4.ip_forward=1
    and guess what? It works now!
    thank you very much vulpi, now I just have to add some automation process in the BT5 pc and that's it... I will create a new thread when needing a different help

    Best regards!

Similar Threads

  1. Replies: 0
    Last Post: 07-11-2010, 10:22 AM
  2. Rogue Access Point
    By Spark1223 in forum Beginners Forum
    Replies: 7
    Last Post: 03-27-2010, 01:28 AM
  3. Access Point: Not-Associated
    By romava in forum Soporte en Wireless
    Replies: 1
    Last Post: 03-18-2010, 05:56 AM
  4. Virtual Access Point
    By .virtual in forum OLD Newbie Area
    Replies: 4
    Last Post: 11-25-2009, 01:10 PM
  5. Access point question
    By Upsman in forum OLD BT3final Support
    Replies: 5
    Last Post: 11-14-2008, 08:22 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts