Gentoo Archives: gentoo-user

From: Fernando Rodriguez <frodriguez.developer@×××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Configuring hostapd
Date: Sun, 02 Aug 2015 23:58:05
Message-Id: BLU436-SMTP198F878A38FE458FFB6E8F98D880@phx.gbl
In Reply to: Re: [gentoo-user] Configuring hostapd by Mick
1 On Sunday, August 02, 2015 11:12:07 PM Mick wrote:
2 > On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez wrote:
3 > > On Sunday, August 02, 2015 1:29:50 PM Mick wrote:
4 > > > On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez wrote:
5 > > > > Hello,
6 > > > >
7 > > > > After installing hostapd I can successfully connect to the AP, I can
8 > > > > get DHCP from it, but I cannot access the network through it (neither
9 > > > > lan or internet).
10 > > >
11 > > > This sounds like a (network) routing problem, rather than a hostapd
12 > > > issue.
13 > >
14 > > It looks like that, but if I stop iptables completely on the router all
15 > > unicast traffic still works in the lan (both wired and through an external
16 > > AP), so if I connect to the hostapd AP with iptables off, shouldn't I at
17 > > the very least be able to ping the wireless interface on the router?
18 > >
19 > > I also tried with only the following rule which enables internet access to
20 > > all wired workstations and through external AP:
21 > >
22 > > iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE
23 >
24 > You should probably specify the local subnet, so that multicast packets are
25 > not sent out to the Internet, e.g.:
26 >
27 > iptables -t nat -A POSTROUTING -o enp0s8 -s 192.168.1.0/24 ! -d
28 192.168.1.0/24
29 > -j MASQUERADE
30 >
31 > (Change 192.168.1.0/24 to suit your LAN subnet)
32
33 I'm not actually using that rule except as a minimal setup for troubleshooting
34 this issue. My actual rules do specify the subnet.
35
36 > Also have you enabled ip forwarding in your kernel:
37 >
38 > sysctl -w net.ipv4.ip_forward=1
39
40 Yes, it is an existing router that works perfectly except for the hostapd AP.
41 My current setup is as follows:
42
43 Internet -> Gentoo Router -> Switch -> AP
44
45 Where AP is a wifi router with routing features disabled. Never had problems
46 with it. Now I installed hostapd on "Gentoo Router" and everything else still
47 works fine except when I connect to the hostapd AP. Even with only that minimal
48 iptable rule or no rules at all.
49
50 Thanks,
51
52 --
53 Fernando Rodriguez

Replies

Subject Author
Re: [gentoo-user] Configuring hostapd Cor Legemaat <cor@××××××.net>