2

My Pi gets internet using a wifi dongle which is mapped to wlan0 and I want to bridge that to eth, so I can connect to the internet using my pc with a cable to the ethernet (eth0) on my Pi. How do I setup that?

wb9688
  • 255
  • 1
  • 2
  • 9
  • You might also be interested in [this](http://raspberrypi.stackexchange.com/a/37596/5538), which is about connecting two pis with an ethernet cable, but in the last part I explain how to forward internet from one to the other. May or may not be as efficient as lower level bridging (but it seemed fine and did not run up the CPU on the outer pi). – goldilocks Oct 28 '15 at 13:14
  • If you are not satisfied with the duplicate, I recommend exploring this on on our larger sibling site [Unix & Linux](http://unix.stackexchange.com/); as Bert points out it is not a pi specific issue and you will probably find higher quality explanations if you exclude "raspberry pi" from your search terms and simply use "linux" (or "linux windows", depending on what your PC runs). – goldilocks Oct 28 '15 at 13:18
  • @goldilocks I know it's not a Pi specific issue and my laptop is running Debian. – wb9688 Oct 29 '15 at 08:05
  • Looks like they have a `bridge` tag at U&L [with 120+ questions](http://unix.stackexchange.com/questions/tagged/bridge) already. Chances are yours is already among them. *Better yet, [Debian has a whole page](https://wiki.debian.org/BridgeNetworkConnections#Bridging_Network_Connections) on this* (and that was the first thing listed when I googled "linux bridge two interfaces"); since Raspbian is pretty much Debian you are set. If you run into a problem with that because of (something you think is) a pi-specific issue, feel free to ask a specific question about it here. – goldilocks Oct 29 '15 at 12:25
  • @goldilocks I found the solution [here](http://serverfault.com/questions/152363/bridging-wlan0-to-eth0) – wb9688 Oct 29 '15 at 13:02
  • \O/ In fact that's pretty much exactly what I did in the question linked in my first comment (except I did not need the dhcpd server). I'm sure it's the easiest way, and when I tried it it did not seem to have any obvious problems (slow traffic, excessive resource use, etc.). – goldilocks Oct 29 '15 at 13:14

1 Answers1

3

It is not Pi specific and I am assuming you are running raspbian on your Pi (any other Linux distro will probably work as well) but if you google "raspbian ethernet bridge" there are some promising results: https://gist.github.com/alandipert/5146588 or http://www.glennklockwood.com/sysadmin-howtos/rpi-wifi-island.html

Bert Neef
  • 131
  • 3