bridge to share WiFi internet connection over eth0
- by rubo77
In this script there is implemented that you create a mesh network and connect other machines to your device to serve an internet connection with dhcp:
echo "starting bridge to share internet connection over eth0"
ifconfig eth0 up promisc
brctl addbr br-freifunk
brctl addif br-freifunk bat0
brctl addif br-freifunk eth0
echo "internet starting, this may take some minutes due to latency..."
echo "(use"
echo "tail -f /var/log/syslog"
echo "in another window for debugging)"
echo
echo dhclient br-freifunk
echo "The error 'Rather than invoking init scripts through /etc/init.d...' can be ignored:"
dhclient br-freifunk
# without bridge: dhclient bat0
This works fine with the freifunk-mesh network.
But how can I serve internet in a normal case?
I would like to connect to any open Wifi I find with my network-manager or wicd (yes, with the graphical GUI) and then start a small script that creates a bridge to my network-out on my laptop
I use Ubuntu and my networkcards are eth0 and wlan0