1 |
On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez wrote: |
2 |
> On Sunday, August 02, 2015 1:29:50 PM Mick wrote: |
3 |
> > On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez wrote: |
4 |
> > > Hello, |
5 |
> > > |
6 |
> > > After installing hostapd I can successfully connect to the AP, I can |
7 |
> > > get DHCP from it, but I cannot access the network through it (neither |
8 |
> > > lan or internet). |
9 |
> > |
10 |
> > This sounds like a (network) routing problem, rather than a hostapd |
11 |
> > issue. |
12 |
> |
13 |
> It looks like that, but if I stop iptables completely on the router all |
14 |
> unicast traffic still works in the lan (both wired and through an external |
15 |
> AP), so if I connect to the hostapd AP with iptables off, shouldn't I at |
16 |
> the very least be able to ping the wireless interface on the router? |
17 |
> |
18 |
> I also tried with only the following rule which enables internet access to |
19 |
> all wired workstations and through external AP: |
20 |
> |
21 |
> iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE |
22 |
|
23 |
You should probably specify the local subnet, so that multicast packets are |
24 |
not sent out to the Internet, e.g.: |
25 |
|
26 |
iptables -t nat -A POSTROUTING -o enp0s8 -s 192.168.1.0/24 ! -d 192.168.1.0/24 |
27 |
-j MASQUERADE |
28 |
|
29 |
(Change 192.168.1.0/24 to suit your LAN subnet) |
30 |
|
31 |
Also have you enabled ip forwarding in your kernel: |
32 |
|
33 |
sysctl -w net.ipv4.ip_forward=1 |
34 |
|
35 |
-- |
36 |
Regards, |
37 |
Mick |