Problems on building own AP
My aim is to build a direct wi-fi connection between my iPad and my Linux machine. Thus I can access my Linux through ssh, ftp, http, and samba server. Since I have a Ralink 3090 wi-fi card in my Linux machine, I want to build it a linux wi-fi AP, and let my iPad connect its ssh or other servers. The driver for wi-fi card is mac80211, with a nl80211 lib, and the daemon software is hostapd.
Hostapd seems work well, since iwconfig tells that wlan0 works on a Master mode, and I can see my wi-fi SSID in iPad. But when iPad connected it, it took several minutes to show connection was ready, and iPad got a strange IP. So I didn't know what IP to connect the Linux box with ssh or http. I did this on Linux box: Code:
ifconfig wlan0 192.168.2.1 broadcast 192.168.2.255 netmask 255.255.255.0 I followed some guides and tried DHCPD, with some level of unclearness. Almost the same thing: iPad or Windows machine got an expected IP (in the range of presetted), but couldn't ping 192.168.2.1. I guess it's not a hostapd problem, but a ip_tables problem or some other settings. I checked this thread: http://www.linuxquestions.org/linux/...s_Access_Point But it is somewhat old, so the kernel modules and iptables command are somewhat different, which means I cannot follow it step by step. I need someone to tell me what my problem looks like to be. iptables? Or? Thanks a lot! And sorry for my English. |
Then I did something like this:
Code:
brctl addbr br0 #This creates the br0 bridge Code:
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE And my iPad got a dynamic IP of 192.168.0.107, which is within my upper router's DHCP range! And I can acces the Internet now. But I can't access my own Linux box! So I think it's a net - subnet problem. Any suggestions? |
I think this means my wireless AP is built. But the linux box still needs other functions to let its wireless client to access its servers. What is it? Router? I need suggestions, thanks!
|
|
All times are GMT -5. The time now is 09:08 PM. |