You are not logged in.
Hello,
I've been trying to bridge my ethernet connection (eth0) to my wireless one (eth1) but haven't managed to get everything working yet. I believe the bridge works when I play a bit with brctl (bridge-utils) but whenever I create a new bridge, I can't connect to my access point any more. How can this be solved? Thanks!
Offline
Okay, I managed to get this done with iptables. The trick was to use a different subnet for the ethernet connection, this is what my current interfaces look like:
eth0 Link encap:Ethernet HWaddr 00:00:39:D6:12:9E
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::200:39ff:fed6:129e/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:881 errors:0 dropped:0 overruns:0 frame:0
TX packets:729 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:81226 (79.3 Kb) TX bytes:149950 (146.4 Kb)eth1 Link encap:Ethernet HWaddr 00:16:41:0C:D7:B8
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::216:41ff:fe0c:d7b8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2121 errors:0 dropped:108 overruns:0 frame:0
TX packets:2259 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:681360 (665.3 Kb) TX bytes:173635 (169.5 Kb)
Interrupt:11 Base address:0x8000
where eth0 is my ethernet and eth1 my wireless interface. I found this script on Google and altered it a bit, now it's working
ptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
Hope this helps someone.
Offline