From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-user+bounces-166072-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D2B07138378 for <garchives@archives.gentoo.org>; Thu, 6 Aug 2015 05:04:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD04EE094C; Thu, 6 Aug 2015 05:04:27 +0000 (UTC) Received: from wnls-smtp9.wa.co.za (wnls-smtp9.wa.co.za [41.185.62.214]) by pigeon.gentoo.org (Postfix) with ESMTP id 9EF27E08FB for <gentoo-user@lists.gentoo.org>; Thu, 6 Aug 2015 05:04:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by wnls-smtp9.wa.co.za (Postfix) with ESMTP id 0D3847F504 for <gentoo-user@lists.gentoo.org>; Thu, 6 Aug 2015 07:04:59 +0200 (SAST) X-Quarantine-ID: <2BPApYu297s0> X-Virus-Scanned: Debian amavisd-new at wnls-smtp1.wa.co.za X-Spam-Flag: NO X-Spam-Score: 0.801 X-Spam-Level: X-Spam-Status: No, score=0.801 tagged_above=-999 required=6 tests=[BAYES_50=0.8, RDNS_DYNAMIC=0.001] autolearn=disabled Received: from wnls-smtp9.wa.co.za ([127.0.0.1]) by localhost (wnls-smtp9.wa.co.za [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2BPApYu297s0 for <gentoo-user@lists.gentoo.org>; Thu, 6 Aug 2015 07:04:57 +0200 (SAST) Received: from test.test (196-215-153-218.dynamic.isadsl.co.za [196.215.153.218]) by wnls-smtp9.wa.co.za (Postfix) with ESMTP id BDA107F522 for <gentoo-user@lists.gentoo.org>; Thu, 6 Aug 2015 07:04:57 +0200 (SAST) Received: from [10.10.10.4] (unknown [10.10.1.2]) by test.test (Postfix) with ESMTP id 7B247F409FE for <gentoo-user@lists.gentoo.org>; Thu, 6 Aug 2015 05:04:20 +0000 (UTC) Message-ID: <1438837467.7575.4.camel@cor.za.net> Subject: Re: [gentoo-user] Configuring hostapd From: Cor Legemaat <cor@cor.za.net> To: gentoo-user@lists.gentoo.org Date: Thu, 06 Aug 2015 07:04:27 +0200 In-Reply-To: <BLU436-SMTP229D6E6A25B78DA976A487A8D750@phx.gbl> References: <BLU436-SMTP9544CAF67FB04D0FF74A218D880@phx.gbl> <BLU436-SMTP198F878A38FE458FFB6E8F98D880@phx.gbl> <1438712323.1344.9.camel@cor.za.net> <BLU436-SMTP229D6E6A25B78DA976A487A8D750@phx.gbl> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-8YpyEHgV9WXdwOtIDvzG" X-Mailer: Evolution 3.13.6 Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 X-Archives-Salt: f176c2e8-9d1c-46df-a164-2132ec6c9d92 X-Archives-Hash: d5c8c3110be91d0e8b289fbe22477ec3 --=-8YpyEHgV9WXdwOtIDvzG Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-08-05 at 01:00 -0400, Fernando Rodriguez wrote: > On Tuesday, August 04, 2015 8:18:43 PM Cor Legemaat wrote: > > On Sun, 2015-08-02 at 19:56 -0400, Fernando Rodriguez wrote: > > > On Sunday, August 02, 2015 11:12:07 PM Mick wrote: > > > > On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez wrote: > > > > > On Sunday, August 02, 2015 1:29:50 PM Mick wrote: > > > > > > On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez wrote: > > > > > > > Hello, > > > > > > >=20 > > > > > > > After installing hostapd I can successfully connect to=20 > > > > > > > the > > > > > > > AP, I can > > > > > > > get DHCP from it, but I cannot access the network=20 > > > > > > > through it > > > > > > > (neither > > > > > > > lan or internet). > > > > > >=20 > > > > > > This sounds like a (network) routing problem, rather than a > > > > > > hostapd > > > > > > issue. > > > > >=20 > > > > > It looks like that, but if I stop iptables completely on the > > > > > router all > > > > > unicast traffic still works in the lan (both wired and=20 > > > > > through > > > > > an external > > > > > AP), so if I connect to the hostapd AP with iptables off, > > > > > shouldn't I at > > > > > the very least be able to ping the wireless interface on the > > > > > router? > > > > >=20 > > > > > I also tried with only the following rule which enables=20 > > > > > internet > > > > > access to > > > > > all wired workstations and through external AP: > > > > >=20 > > > > > iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE > > > >=20 > > > > You should probably specify the local subnet, so that multicast > > > > packets are > > > > not sent out to the Internet, e.g.: > > > >=20 > > > > iptables -t nat -A POSTROUTING -o enp0s8 -s 192.168.1.0/24 ! -d > > > 192.168.1.0/24 > > > > -j MASQUERADE > > > >=20 > > > > (Change 192.168.1.0/24 to suit your LAN subnet) > > >=20 > > > I'm not actually using that rule except as a minimal setup for > > > troubleshooting > > > this issue. My actual rules do specify the subnet. > > >=20 > > > > Also have you enabled ip forwarding in your kernel: > > > >=20 > > > > sysctl -w net.ipv4.ip_forward=3D1 > > >=20 > > > Yes, it is an existing router that works perfectly except for the > > > hostapd AP. > > > My current setup is as follows: > > >=20 > > > Internet -> Gentoo Router -> Switch -> AP > > >=20 > > > Where AP is a wifi router with routing features disabled. Never=20 > > > had > > > problems > > > with it. Now I installed hostapd on "Gentoo Router" and=20 > > > everything > > > else still > > > works fine except when I connect to the hostapd AP. Even with=20 > > > only > > > that minimal > > > iptable rule or no rules at all. > > >=20 > > > Thanks, > > >=20 > > Probably /dev/random depleated, try enable your hardware rng or=20 > > sys- > > apps/haveged test with `cat /proc/sys/kernel/random/entropy_avail` > >=20 > > Regards: > > Cor >=20 > Thanks. II did get an error about depleted entropy at some point=20 > when starting > hostapd but I went ahead and installed haveged and it still doesn't=20 > work. It > doesn't even work when configured as an open AP. I checked the=20 > kernel config and > I had VLAN support disabled. I've rebuilt it but can't reboot right=20 > now. Maybe > it's required even though I'm not using VLANs? >=20 Is there an IP configured on the interface or the bridge of that=20 interface? Can you ping your gateway? If I'm correct dhcp uses=20 broadcast but you need a valid gateway IP switchable on mac layer. Does it stay connected? I have a problem with a link between hostapd=20 and a mikrotik device on 802.11a where I needed to patch hostapd to=20 get it to stay connected. But that should show in hostapd debug logs.=20 Mine is still running on hostapd-2.3 because if I update and screw it=20 my internet is broken, if that's your problem I will search for my=20 notes and mail it. Regards: Cor --=-8YpyEHgV9WXdwOtIDvzG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVwurcAAoJEFl6IPCBxnEG3NQH/34qBYewZl7T+Y6s8dxhFwSS 9BDEkog37Em4vUNlF512p60kbPNJFWfD9Yd0qmFnABeTivp0YGz3U24TzvytDdIf JwQzOZrPlbXXwB/9ds1Yy+m5Ed3IyLDiRsIHYK3XvFpcO/VxfbO4c5mAew1IJsUp HiBSNE4cVqF5cWJCVKM8LyI5skLAsbXZZtx3If2oCghjnSatYqo6rvlz5GajLk1d 41L+TpGHHRqe8TJzwQM+ODMW+6do0ETbFUUNBMLSPYb4yAdyYCi5eJK1LB1G/96p X7FCAGT8iNJQ4m4iRj9D/X9OAedMLk1kUebUt1tdjB24M/g/GcVPFAF++7bflkg= =1m+Q -----END PGP SIGNATURE----- --=-8YpyEHgV9WXdwOtIDvzG--