bridge to share WiFi internet connection over eth0

Posted by rubo77 on Server Fault See other posts from Server Fault or by rubo77
Published on 2013-10-25T08:41:25Z Indexed on 2013/10/25 9:57 UTC
Read the original article Hit count: 260

Filed under:
|
|

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

© Server Fault or respective owner

Related posts about networking

Related posts about wifi