I have tried three different tutorials to attempt to set up my RPi as an wifi access point.
In all cases, I cannot connect properly to the RPi. I can see the wifi network from other devices, but my Android phone gets stuck on "Obtaining IP address…".
I know that my Ralink RT5370 should work. I have also attempted to follow the suggestions here and manually start udhcpd
or dnsmasq
after the RPi obtains its wlan0 IP address. This did not help.
This is the output for (page one of) the third tutorial. In all cases, I can see inet addr
for wlan0
(but nothing for mon.wlan0
).
$ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:43:fe:10
inet addr:192.168.1.91 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4373 errors:0 dropped:0 overruns:0 frame:0
TX packets:3167 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:320392 (312.8 KiB) TX bytes:484473 (473.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:260 (260.0 B) TX bytes:260 (260.0 B)
mon.wlan0 Link encap:UNSPEC HWaddr 7C-DD-90-41-31-35-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:393 (393.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 7c:dd:90:41:31:35
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15182 (14.8 KiB) TX bytes:10725 (10.4 KiB)
Contents of /etc/iptables.ipv4.nat
# Generated by iptables-save v1.4.14 on Sat Sep 28 10:59:25 2013
*nat
:PREROUTING ACCEPT [2:338]
:INPUT ACCEPT [2:338]
:OUTPUT ACCEPT [1:260]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Sat Sep 28 10:59:25 2013
# Generated by iptables-save v1.4.14 on Sat Sep 28 10:59:25 2013
*filter
:INPUT ACCEPT [151:8950]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [145:15700]
:fail2ban-ssh - [0:0]
-A INPUT -p tcp -m multiport --dports 22 -j fail2ban-ssh
-A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan0 -o eth0 -j ACCEPT
-A fail2ban-ssh -j RETURN
COMMIT
# Completed on Sat Sep 28 10:59:25 2013
sudo ufw allow 67:68/udp
and thensudo ufw allow 67:68/tcp
. Onlysudo ufw disable
allowed internet connectivity from the wifi clients. I've edited the question to provide iptables configuration.sudo ufw allow 67:68/udp
allows the Pi to work as a AP. Thanks for your help. (I'm going give "solved" to N10 for suggesting the firewall (and ports) first, but I'll +1 you for your help.)