Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have tried using ap-hotspot from WebUpd8, and it did not work for me in 13.10 or 14.04, so I have been working on getting hostapd manually set up, using isc-dhcp-server since dnsmasq was having conflicts for me. I have been able to connect to the AP, and get an IP, but routing does not seem to want to work. Here is my build log and the guides I have been following (http://askubuntu.com/a/180734/279108) (thenewbieblog.wordpress.com/2012/05/01/wifi-hotspot-setup-on-ubuntu/) (danbishop.org/2011/12/11/using-hostapd-to-add-wireless-access-point-capabilities-to-an-ubuntu-server/)

Config files:

/etc/network/interfaces

auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
hostapd -dd /etc/hostapd/hostapd.conf
address 10.10.0.1
netmask 255.255.255.0

/etc/default/hostapd

RUN_DAEMON="yes"
DAEMON_CONF="/etc/hostapd/hostapd.conf"
DAEMON_OPTS="-dd"

/etc/hostapd/hostapd.conf

# WiFi Hotspot
interface=wlan0
driver=nl80211
#Access Point
ssid=workshop
hw_mode=g
# WiFi Channel:
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mypass
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

/etc/dhcp/dhcpd.conf

ddns-update-style none;
#default-lease-time 600;
#max-lease-time 7200;
log-facility local7;
subnet 10.10.0.0 netmask 255.255.255.0 {
    range 10.10.0.2 10.10.0.32;
    option domain-name-servers 208.67.222.222, 208.67.220.220;
    option routers 10.10.0.1;
}

/etc/rc.local

iptables -t nat -A POSTROUTING -s 10.10.0.0/32 -o eth1 -j MASQUERADE
exit 0

sudo ifconfig wlan0 10.10.0.1

sudo sysctl net.ipv4.ip_forward=1

sudo ip link set dev wlan0 up

sudo service hostapd start

I have installed bridge-utils, but I have not added br0 yet because I am not sure how to change the other parts of my config to reflect it...

Edit: After double checking my configs through another (older) guide, tried again and decided to add what shows up in the logs when something connects. The device connecting is my android phone, which connects fine through normal routers.

[I understand most of what is going on in the logs, and startup looks fine. Then scrolling randomness...]
Add randomness: count=52 entropy=51
mgmt::auth
authentication: STA=a0:f4:50:18:a2:c3 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA a0:f4:50:18:a2:c3 IEEE 802.11: authentication OK (open system)
wlan0: STA a0:f4:50:18:a2:c3 MLME: MLME-AUTHENTICATE.indication(a0:f4:50:18:a2:c3, OPEN_SYSTEM)
wlan0: STA a0:f4:50:18:a2:c3 MLME: MLME-DELETEKEYS.request(a0:f4:50:18:a2:c3)
authentication reply: STA=a0:f4:50:18:a2:c3 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
Add randomness: count=53 entropy=52
mgmt::auth cb
wlan0: STA a0:f4:50:18:a2:c3 IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=a0:f4:50:18:a2:c3 capab_info=0x431 listen_interval=20
  new AID 1
wlan0: STA a0:f4:50:18:a2:c3 IEEE 802.11: association OK (aid 1)
Add randomness: count=54 entropy=53
mgmt::assoc_resp cb
wlan0: STA a0:f4:50:18:a2:c3 IEEE 802.11: associated (aid 1)
wlan0: STA a0:f4:50:18:a2:c3 MLME: MLME-ASSOCIATE.indication(a0:f4:50:18:a2:c3)
wlan0: STA a0:f4:50:18:a2:c3 MLME: MLME-DELETEKEYS.request(a0:f4:50:18:a2:c3)
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x9f8ac90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=a0:f4:50:18:a2:c3
wlan0: STA a0:f4:50:18:a2:c3 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x9f8ac90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=a0:f4:50:18:a2:c3
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
wlan0: STA a0:f4:50:18:a2:c3 WPA: start authentication
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x9f8ac90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=a0:f4:50:18:a2:c3
wlan0: STA a0:f4:50:18:a2:c3 IEEE 802.1X: unauthorizing port
WPA: a0:f4:50:18:a2:c3 WPA_PTK_GROUP entering state IDLE
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state AUTHENTICATION
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state AUTHENTICATION2
WPA: Re-initialize GMK/Counter on first station
Get randomness: len=32 entropy=54
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=22
Key Counter - hexdump(len=32): [REMOVED]
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
wpa_driver_nl80211_set_key: ifindex=3 alg=3 addr=0x80dd6be key_idx=1 set_tx=1 seq_len=0 key_len=16
   broadcast key
WPA: Assign ANonce - hexdump(len=32): 12 53 6f 26 8a a3 87 09 b4 31 e2 81 ef c3 ea 3e 6c 3d 0c a5 fb 85 07 f2 0a 2a 4a 5e a2 00 59 e9
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state INITPSK
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state PTKSTART
wlan0: STA a0:f4:50:18:a2:c3 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
WPA: Use EAPOL-Key timeout of 100 ms (retry counter 1)
nl80211: Event message available
nl80211: New station a0:f4:50:18:a2:c3
IEEE 802.1X: a0:f4:50:18:a2:c3 TX status - version=2 type=3 length=95 - ack=1
WPA: EAPOL-Key TX status for STA a0:f4:50:18:a2:c3 ack=1
WPA: Increase initial EAPOL-Key 1/4 timeout by 1000 ms because of acknowledged frame
IEEE 802.1X: 121 bytes from a0:f4:50:18:a2:c3
   IEEE 802.1X: version=1 type=3 length=117
WPA: Received EAPOL-Key from a0:f4:50:18:a2:c3 key_info=0x10a type=2 key_data_length=22
WPA: Received Key Nonce - hexdump(len=32): 7c 4d 99 9f 10 56 93 84 a9 8a f8 15 d8 8e 1e 6d 2f 39 95 8f bc 99 9a 4c 06 3d 37 65 e6 db 49 fa
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
Add randomness: count=55 entropy=0
wlan0: STA a0:f4:50:18:a2:c3 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=90:4c:e5:55:94:4d A2=a0:f4:50:18:a2:c3
WPA: Nonce1 - hexdump(len=32): 12 53 6f 26 8a a3 87 09 b4 31 e2 81 ef c3 ea 3e 6c 3d 0c a5 fb 85 07 f2 0a 2a 4a 5e a2 00 59 e9
WPA: Nonce2 - hexdump(len=32): 7c 4d 99 9f 10 56 93 84 a9 8a f8 15 d8 8e 1e 6d 2f 39 95 8f bc 99 9a 4c 06 3d 37 65 e6 db 49 fa
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA a0:f4:50:18:a2:c3 WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8 kde_len=46 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
WPA: Use EAPOL-Key timeout of 100 ms (retry counter 1)
IEEE 802.1X: a0:f4:50:18:a2:c3 TX status - version=2 type=3 length=151 - ack=1
WPA: EAPOL-Key TX status for STA a0:f4:50:18:a2:c3 ack=1
IEEE 802.1X: 99 bytes from a0:f4:50:18:a2:c3
   IEEE 802.1X: version=1 type=3 length=95
WPA: Received EAPOL-Key from a0:f4:50:18:a2:c3 key_info=0x30a type=2 key_data_length=0
WPA: Received Key Nonce - hexdump(len=32): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
wlan0: STA a0:f4:50:18:a2:c3 WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: a0:f4:50:18:a2:c3 WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=3 alg=3 addr=0x9f8ac90 key_idx=0 set_tx=1 seq_len=0 key_len=16
   addr=a0:f4:50:18:a2:c3
wlan0: AP-STA-CONNECTED a0:f4:50:18:a2:c3
wlan0: STA a0:f4:50:18:a2:c3 IEEE 802.1X: authorizing port
wlan0: STA a0:f4:50:18:a2:c3 RADIUS: starting accounting session 536C1843-00000000
wlan0: STA a0:f4:50:18:a2:c3 WPA: pairwise key handshake completed (RSN)
Add randomness: count=56 entropy=1
[more randomness, until I ctrl+c]
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.