4

I have a situation which requires routing the connection from wlan0 to eth0 over the same network. The reason behind this, is that I would want to be able to connect to a device connected to the RPi over eth0, but through wlan0, so the RPi acts as a connection bridge to the eth0 device. However, I only have a private Wifi network available and only have access to static IP range from 192.168.0.90 - 192.168.0.110.

I found few articles which guides through similar processes (e.g. http://rbnrpi.wordpress.com/project-list/wifi-to-ethernet-adapter-for-an-ethernet-ready-tv/), but as I said, I don't have such access which would allow me to create different networks etc... Also, I'm very inexperienced with such things, so won't be able to modify the guide to my needs.

My goal is to come out with an IP address for the eth0 device which I can connect two, if I'm connected to the same network as the wlan0. Would that be feasible at all?

Thanks!

Taha
  • 51
  • 1
  • 4

1 Answers1

2

You may be able to create a network bridge. This essentially lets your Pi act as a network switch between the Wi-fi and wired networks.

sudo apt-get install bridge-utils
sudo ifconfig eth0 0.0.0.0
sudo ifconfig wlan0 0.0.0.0
sudo brctl addbr br0
sudo brctl addif br0 eth0
sudo brctl addif br0 wlan0
sudo dhclient br0

Note that not all Wi-fi devices will support this though as it requires the ability to spoof MAC addresses, which not all devices support. If your card is of reasonable quality it should work though. (If it supports hostapd you're probably fine.)

Fred
  • 4,422
  • 16
  • 29