You are not logged in.

#1 2010-06-28 17:26:19

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Help setting up wireless network sharing (hostapd + iptables +dnsmasq)

I'm trying to share my laptop's wifi signal with my droid.  Why?  Because I'm out of the country for about a year (work) and have no cell service but have managed to route free calls through my phone and a wifi signal  (Yay google voice!).  The problem is that where I'm at only allows one device (mac) login per person.  Ad-hoc mode isn't an option because Android can't connect to ad-hoc networks currently.

My laptop has an integrated card (wlan1) and a usb card (wlan0).  I've been trying to get hostapd + dnsmasq + iptables to work but I can't seem to get my laptop to issue an ip to my droid. 

Here's the output of 'hostapd -dd /etc/hostapd/hostapd.conf' : http://pastebin.com/1c0BSm7Z

Here's my hostapd.confhttp://pastebin.com/TUqQ25Ds

Here's my iptables.rules file (created with 'iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE' ) : http://pastebin.com/11yNbCS6

All my dnsmasq.conf has is this line:  dhcp-range=192.168.1.50,192.168.1.150,12h

I've enabled ip_forwarding with:  'echo 1 > /proc/sys/net/ipv4/ip_forward'
as well as edited /etc/sysctl.conf to read: net.ipv4.ip_forward=1

(the above steps were found in the Internet Sharing wiki)

I've also tried following the steps laid out in the wiki page for creating a Software Access Point but it seems a bit outdated.

Also, I currently use wicd to manage my networks but am willing to switch to knetworkmanager if necessary.

Thanks!

Last edited by ctarwater (2010-06-29 01:54:11)

Offline

#2 2010-07-01 12:06:58

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Help setting up wireless network sharing (hostapd + iptables +dnsmasq)

are you able to successfully connect to your system AP with the droid?, if dnsmasq's dhcp is the actual problem, try setting your droid to a static ip address and see if you can ping the droid from your pc.

Offline

Board footer

Powered by FluxBB