LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   wireless-wired bridge on debian squeeze (https://www.linuxquestions.org/questions/linux-networking-3/wireless-wired-bridge-on-debian-squeeze-883201/)

_jmz_ 05-28-2011 10:30 AM

wireless-wired bridge on debian squeeze
 
I'm trying to set up a wireless->wired bridge under debian (powerpc release on a powerbook g4 if that relevant) so I can share the wifi connection on my laptop over ethernet with my desktop.

I've installed bridge-utils and ebtables and I have been reading http://wiki.debian.org/BridgeNetworkConnections.

So I have configured it like this:

Code:

$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp

# Wireless
iface eth1 inet dhcp
    wireless-essid O2wireless050063
    wireless-key abcdefghij

iface eth0 inet manual

#iface eth1 inet manual

# Bridge
iface br0 inet dhcp
    bridge_ports eth0 eth1
    pre-up iwconfig eth1 essid "O2wireless050063"
    pre-up iwconfig eth1 key "abcdefghij"
    bridge_hw 00:30:65:1f:3b:c0

Then i set the ebtable rules with this script:

Code:

$ cat ebt_rules.sh
#!/bin/bash

ebtables -t nat -A POSTROUTING -o eth1 -j snat --to-src 00:30:65:1f:3b:c0 --snat-arp --snat-target ACCEPT

ebtables -t nat -A PREROUTING -p IPv4 -i eth1 --ip-dst 192.168.1.50 -j dnat --to-dst 00:22:15:74:cc:7d --dnat-target ACCEPT

ebtables -t nat -A PREROUTING -p ARP -i eth1 --arp-ip-dst 192.168.1.50 -j dnat --to-dst 00:22:15:74:cc:7d --dnat-target ACCEPT

^here I'm not sure if the mac address in the first line is correct, it's the mac address of my wireless interface. The debain wiki says it should be the mac address of the bridge, and since I did "bridge_hw 00:30:65:1f:3b:c0" in /etc/network/interfaces I think this is correct

so now with this all set up I do "ifup br0", but it fails to get an IP address and just dhcp listens until it times out.

Can anyone see what I've done wrong?

tragedyofhumor 01-16-2012 09:46 AM

You've gotten that far?
 
I've been trying to accomplish the same thing. Using a samsung n150 w/ Debian Squeeze 6.0.3 (laptop w/ wireless card) and an old dell p.o.s. failurebox (desktop with a confirmed working ethernet card).

Followed the instructions in the Debian wiki to the letter, but didn't even get as far as trying to assign an IP. It seems like, as soon as I "ifup br0," it shuts down my wlan0. the ethernet side of things still seems to work, ifconfig shows packet transfer both ways, but..

I'll try again and post more later, interfaces file contents and whatnot, (just got called into work) but I don't see anything wrong with bumping this thread in the mean time. I've read a lot of other posts where people have gotten this system working, and a few saying that it just can't be done, so, who knows?

Thanks to anyone who's read this for the time it took to do so =P
~HR

TimothyEBaldwin 01-28-2012 07:07 AM

If 192.168.1.50 and 00:22:15:74:cc:7d are the addresses of your desktop I would expect that to work for IPv4, however you have broken IPv6.

You could block IP6 entirely, but that is not future proof.


All times are GMT -5. The time now is 08:29 PM.