[Techtalk] fun with routing and wireless

Wim De Smet kromagg at gmail.com
Sat Sep 2 12:45:53 UTC 2006

On 8/31/06, Carla Schroder <carla at bratgrrl.com> wrote:
> o great wuns,
> I am futzing with Pyramid Linux on a Soekris board to build a nice Internet
> router and wireless access point. It's a temporary setup because next week
> I'm blowing it away and using Bering instead, which is much nicer. (long
> story, don't ask.) But for now I must make it work.
> The wireless bit works perfectly; clients find the WAP and get DHCP, ping back
> and forth, etc. But it ends there. I want the wireless clients to get the
> same goodies as the wired LAN clients, Internet and LAN services.
> Pyramid does not have bridge-utils, so as near as I can tell there is no way
> to bridge the wireless NIC to the wired LAN NIC without rebuilding the whole
> dern operaring system (insert much cussing.)  So what other options do I
> have? I spose a couple iptables rules will do the job- what about routing?
> This is the setup:
> ath0   -- wireless interface
> eth0  --- wired LAN interface
> lan


I assume there's an interface like wlan <internet ip> on this wireless
router of yours, or not? Anyway, that would simply take adding some
iptables rules then, routing should be okay since clients will have
the DHCP as default gateway and if that gateway is set to forward
packets (should) stuff will be hunkey dorey I think.

rules would look like:
iptables -t nat -I POSTROUTING -s -j MASQUERADE (use
SNAT if the IP is static)

Note that this happens in postrouting, so routing should send all
packets headed to the internets out of the right interface, but if
it's on the same box that shouldn't be a problem.

If there's a separate gateway somewhere on the wired lan things get
more interesting though. Guess a simple route rule would most likely
fix that, unless the gateway refuses to route packets from that
particular network, or worse, doesn't know where to route the replies
to. In that case you would probably do the exact same things such that
all IP's on the wireless network seem to originate from the AP's IP.

Hope that makes some sense. Note: I'm not a qualified network
technician, nor do I play one on TV.


More information about the Techtalk mailing list