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?