Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Cc: Jason Carson <jason@×××××××××××.ca>
Subject: Re: [gentoo-user] Creating a wireless router
Date: Fri, 18 Jul 2008 19:48:53
Message-Id: 8B358F42-BD84-4B68-9513-DF332462A65D@stellar.eclipse.co.uk
In Reply to: [gentoo-user] Creating a wireless router by Jason Carson
1 On 18 Jul 2008, at 15:30, Jason Carson wrote:
2 > ...
3 > I want to setup a wireless router for the first time using WPA.
4 > Here is
5 > the setup I want...
6 >
7 > Internet---Gentoo Wireless Router---My Computer
8 >
9 > I have configured my kernel properly from what I can tell and emerged
10 > madwifi. However when I modprobe ath_pci nothing shows up. When I do
11 > ifconfig -a I get...
12 > ....
13
14 Hi there,
15
16 I assume you've read
17 http://gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point ?
18
19 When I wrote this I was using a Prism54 card, not an Atheros-based
20 one. I have used Atheros since (and would as a matter of choice), but
21 it appears I never got around to updating the wiki (and I won't
22 update it in the future because, basically, maintaining wikis is a
23 lot of work). Further reading reveals inaccuracies in the current
24 article.
25
26 Madwifi requires an extra step when creating the interface:
27
28 wlanconfig ath0 create wlandev wifi0 wlanmode ap
29
30 http://madwifi.org/wiki/UserDocs/SimpleAccessPoint
31
32 IIRC you can do this in your modprobe or udev rules (preferable), or
33 as a preup stage in /etc/conf.d/net
34 IIRC a udev (??) rule is created automagically when you first create
35 the interface and it's this you can edit to make it so that it
36 automatically comes up as an AP, rather than in client mode.
37
38 You state that "However when I modprobe ath_pci nothing shows up",
39 but the interface HAS come up - it's shown as wifi0 in the ifconfig
40 output you post. I don't use WPA but when using WEP (which I would
41 advise you to get working first) you then have to:
42
43 ifconfig wifi0 up
44 iwconfig wifi0 mode Master essid foobert channel 11
45 iwconfig wifi0 essid foobert channel 11 key aabbccdd
46
47 (or, obviously, the equivalent in /etc/conf.d/net - this is well
48 documented in /etc/conf.d/net.example)
49
50 Anyway, Google "madwifi master mode" should give you plenty of fodder
51 to get things up on a one-off basis using manual commands so that you
52 can see it's working. You then just have to figure out how to
53 integrate what you've learned into the Gentoo bootscripts - hopefully
54 Google "gentoo madwifi master mode" will help.
55
56 > However my computer doesn't show a wireless network to connect too.
57
58 I assume you mean your OTHER, client, computer by this. When posting
59 problems it helps to be as explicit as possible - for example when
60 posting the ifconfig output it would've been beneficial to post
61 EVERYTHING you did in order to get there.
62
63 Oh! Also, the great thing about the madwifi drivers is that you can
64 great virtual APs - as long as they all have the same channel then
65 you can have wifi0, wifi1 and wifi2 on the same card (just
66 `wlanconfig ath0 create wlandev wifi1 wlanmode ap && wlanconfig ath0
67 create wlandev wifi2 wlanmode ap`). You can run one of these open,
68 one as WEP and (presumably) one as WPA, bridging the secure networks
69 with your wired LAN (for best integration) and NATting the open
70 network using iptables (so you can give clients free or filtered
71 internet access without having to worry about them accessing LAN
72 services. This is useful if you have a Nintendo DS, which doesn't
73 support WPA).
74
75 Please post back any problems.
76
77 Stroller.
78
79
80 --
81 gentoo-user@l.g.o mailing list