1 |
On Thursday, August 06, 2015 7:04:27 AM Cor Legemaat wrote: |
2 |
> On Wed, 2015-08-05 at 01:00 -0400, Fernando Rodriguez wrote: |
3 |
> > On Tuesday, August 04, 2015 8:18:43 PM Cor Legemaat wrote: |
4 |
> > > On Sun, 2015-08-02 at 19:56 -0400, Fernando Rodriguez wrote: |
5 |
> > > > On Sunday, August 02, 2015 11:12:07 PM Mick wrote: |
6 |
> > > > > On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez wrote: |
7 |
> > > > > > On Sunday, August 02, 2015 1:29:50 PM Mick wrote: |
8 |
> > > > > > > On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez wrote: |
9 |
> > > > > > > > Hello, |
10 |
> > > > > > > > |
11 |
> > > > > > > > After installing hostapd I can successfully connect to |
12 |
> > > > > > > > the |
13 |
> > > > > > > > AP, I can |
14 |
> > > > > > > > get DHCP from it, but I cannot access the network |
15 |
> > > > > > > > through it |
16 |
> > > > > > > > (neither |
17 |
> > > > > > > > lan or internet). |
18 |
> > > > > > > |
19 |
> > > > > > > This sounds like a (network) routing problem, rather than a |
20 |
> > > > > > > hostapd |
21 |
> > > > > > > issue. |
22 |
> > > > > > |
23 |
> > > > > > It looks like that, but if I stop iptables completely on the |
24 |
> > > > > > router all |
25 |
> > > > > > unicast traffic still works in the lan (both wired and |
26 |
> > > > > > through |
27 |
> > > > > > an external |
28 |
> > > > > > AP), so if I connect to the hostapd AP with iptables off, |
29 |
> > > > > > shouldn't I at |
30 |
> > > > > > the very least be able to ping the wireless interface on the |
31 |
> > > > > > router? |
32 |
> > > > > > |
33 |
> > > > > > I also tried with only the following rule which enables |
34 |
> > > > > > internet |
35 |
> > > > > > access to |
36 |
> > > > > > all wired workstations and through external AP: |
37 |
> > > > > > |
38 |
> > > > > > iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE |
39 |
> > > > > |
40 |
> > > > > You should probably specify the local subnet, so that multicast |
41 |
> > > > > packets are |
42 |
> > > > > not sent out to the Internet, e.g.: |
43 |
> > > > > |
44 |
> > > > > iptables -t nat -A POSTROUTING -o enp0s8 -s 192.168.1.0/24 ! -d |
45 |
> > > > 192.168.1.0/24 |
46 |
> > > > > -j MASQUERADE |
47 |
> > > > > |
48 |
> > > > > (Change 192.168.1.0/24 to suit your LAN subnet) |
49 |
> > > > |
50 |
> > > > I'm not actually using that rule except as a minimal setup for |
51 |
> > > > troubleshooting |
52 |
> > > > this issue. My actual rules do specify the subnet. |
53 |
> > > > |
54 |
> > > > > Also have you enabled ip forwarding in your kernel: |
55 |
> > > > > |
56 |
> > > > > sysctl -w net.ipv4.ip_forward=1 |
57 |
> > > > |
58 |
> > > > Yes, it is an existing router that works perfectly except for the |
59 |
> > > > hostapd AP. |
60 |
> > > > My current setup is as follows: |
61 |
> > > > |
62 |
> > > > Internet -> Gentoo Router -> Switch -> AP |
63 |
> > > > |
64 |
> > > > Where AP is a wifi router with routing features disabled. Never |
65 |
> > > > had |
66 |
> > > > problems |
67 |
> > > > with it. Now I installed hostapd on "Gentoo Router" and |
68 |
> > > > everything |
69 |
> > > > else still |
70 |
> > > > works fine except when I connect to the hostapd AP. Even with |
71 |
> > > > only |
72 |
> > > > that minimal |
73 |
> > > > iptable rule or no rules at all. |
74 |
> > > > |
75 |
> > > > Thanks, |
76 |
> > > > |
77 |
> > > Probably /dev/random depleated, try enable your hardware rng or |
78 |
> > > sys- |
79 |
> > > apps/haveged test with `cat /proc/sys/kernel/random/entropy_avail` |
80 |
> > > |
81 |
> > > Regards: |
82 |
> > > Cor |
83 |
> > |
84 |
> > Thanks. II did get an error about depleted entropy at some point |
85 |
> > when starting |
86 |
> > hostapd but I went ahead and installed haveged and it still doesn't |
87 |
> > work. It |
88 |
> > doesn't even work when configured as an open AP. I checked the |
89 |
> > kernel config and |
90 |
> > I had VLAN support disabled. I've rebuilt it but can't reboot right |
91 |
> > now. Maybe |
92 |
> > it's required even though I'm not using VLANs? |
93 |
> > |
94 |
> Is there an IP configured on the interface or the bridge of that |
95 |
> interface? |
96 |
|
97 |
Yes |
98 |
|
99 |
> Can you ping your gateway? |
100 |
|
101 |
No...I can ping it locally or remotely when I connect through the external AP |
102 |
but not through hostapd. |
103 |
|
104 |
> If I'm correct dhcp uses |
105 |
> broadcast but you need a valid gateway IP switchable on mac layer. |
106 |
> |
107 |
> Does it stay connected? |
108 |
|
109 |
Yes |
110 |
|
111 |
> I have a problem with a link between hostapd |
112 |
> and a mikrotik device on 802.11a where I needed to patch hostapd to |
113 |
> get it to stay connected. But that should show in hostapd debug logs. |
114 |
> Mine is still running on hostapd-2.3 because if I update and screw it |
115 |
> my internet is broken, if that's your problem I will search for my |
116 |
> notes and mail it. |
117 |
|
118 |
Tried hostapd-2.3 too, same thing. |
119 |
I will try it on a laptop with a more recent adapter tomorrow to rule that |
120 |
out. |
121 |
|
122 |
> Regards: |
123 |
> Cor |
124 |
|
125 |
-- |
126 |
Fernando Rodriguez |