1

I have tried three different tutorials to attempt to set up my RPi as an wifi access point.

  1. Adafruit
  2. elinux
  3. (Page one of) sirlagz

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
Sparhawk
  • 683
  • 4
  • 18
  • 34

2 Answers2

3

I had similar problems when I was running this setup (but from Kali, not Raspbian).

Ensure your DHCP service is actually running. Mine would error out to the logs.

Also make sure your firewall (if running) is allowing DHCP through.

Your DHCP config file would be helpful for further information.

N10
  • 128
  • 1
  • 7
1

No IP Address for mon.wlan0 is normal.
What DHCP server are you using ?
Can you paste the config for the DHCP server ?
Assuming you're using Raspbian - What's the contents of /etc/network/interfaces ?
Have you disabled ifplugd ? ifplugd causes issues with hostapd.

Lawrence
  • 2,692
  • 15
  • 14