1 |
On Sunday, August 02, 2015 1:29:50 PM Mick wrote: |
2 |
> On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez wrote: |
3 |
> > Hello, |
4 |
> > |
5 |
> > After installing hostapd I can successfully connect to the AP, I can get |
6 |
> > DHCP from it, but I cannot access the network through it (neither lan or |
7 |
> > internet). |
8 |
> |
9 |
> This sounds like a (network) routing problem, rather than a hostapd issue. |
10 |
|
11 |
It looks like that, but if I stop iptables completely on the router all |
12 |
unicast traffic still works in the lan (both wired and through an external AP), |
13 |
so if I connect to the hostapd AP with iptables off, shouldn't I at the very |
14 |
least be able to ping the wireless interface on the router? |
15 |
|
16 |
I also tried with only the following rule which enables internet access to all |
17 |
wired workstations and through external AP: |
18 |
|
19 |
iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE |
20 |
|
21 |
|
22 |
> > This is an existing router box so iptables and everything else |
23 |
> > is already properly configured. |
24 |
> > |
25 |
> > I'm using this minimal config: |
26 |
> > |
27 |
> > interface=wlp0s10 |
28 |
> > #driver=nl80211 |
29 |
> > hw_mode=g |
30 |
> > channel=6 |
31 |
> > #ieee80211d=1 |
32 |
> > #country_code=FR |
33 |
> > #ieee80211n=1 |
34 |
> > #wmm_enabled=1 |
35 |
> > |
36 |
> > ssid=LinuxAP |
37 |
> > auth_algs=1 |
38 |
> > wpa=2 |
39 |
> > wpa_key_mgmt=WPA-PSK |
40 |
> > rsn_pairwise=CCMP |
41 |
> > wpa_passphrase=hello linux ap |
42 |
> > |
43 |
> > iw list shows the following supported modes: |
44 |
> > * IBSS |
45 |
> > * managed |
46 |
> > * AP |
47 |
> > * AP/VLAN |
48 |
> > * monitor |
49 |
> > |
50 |
> > The ebuild warns that in order for hostapd to work I need to set the card |
51 |
> > in master mode (the wiki makes no mention of it). |
52 |
> |
53 |
> I think this is a matter of nomenclature. Your AP & AP/VLAN would/should be |
54 |
> the equivalent to master mode. |
55 |
> |
56 |
> |
57 |
> > But when I try to do |
58 |
> > that (either through the net init scripts or through iwconfig) I get the |
59 |
> > following error: |
60 |
> > |
61 |
> > Error for wireless request "Set Mode" (8B06) : |
62 |
> > SET failed on device wlp0s10 ; Invalid argument. |
63 |
> |
64 |
> Did you try setting it up as AP, or AP/VLAN to see if it works? In the |
65 |
latter |
66 |
> you will also need to setting a route for the AP VLAN to access the default |
67 |
> (V)LAN and Internet. |
68 |
|
69 |
I did, same error. But I found that this is an issue with mac80211 based |
70 |
drivers, they can only be set to master mode through the nl80211 interface |
71 |
which is what hostapd uses. So from what I understand, as long as iw list |
72 |
shows AP mode I'm good and the ebuild warning is outdated. I believe you just |
73 |
net to enable the netlink use flag (which I did) for it to work. |
74 |
|
75 |
http://linuxwireless.org/en/users/Documentation/hostapd/ |
76 |
|
77 |
Thanks, |
78 |
|
79 |
-- |
80 |
Fernando Rodriguez |