7

I wanted to create a Wifi to Ethernet Bridge on my Raspberry Pi, similar to this one. The problem is: I want to conntect a Network Harddrive (WD MyCloud) to the ethernet side. The Harddrive seems to have internet access from its side but I can't access the dashboard of it or mount to my computer.

What do I have to change that the RPi doesn't only give the Harddrive access to the internet but also give other devices in my network access to the Harddrive?

Edit: The Harddrive is a network harddrive that you just plug into ethernet and it connects to your network. I can see that it has network access because it has a blue LED on and not the red one it would have turned on if it didn't have network access. The Raspberry Pi is running stock Raspbian.

Fabian
  • 1,238
  • 1
  • 8
  • 19
Galevux
  • 71
  • 1
  • 1
  • 2
  • @Fabian The Harddrive is a network harddrive that you just plug into ethernet and it connects to your network. I can see that it has network access because it has a blue LED on and not the red one it would have turned on if it didn't have network access. The Raspberry Pi is running stock Raspbian – Galevux Mar 18 '18 at 10:57
  • This looks similar to https://raspberrypi.stackexchange.com/q/51057/33476 – Dmitry Grigoryev Sep 14 '21 at 11:10

1 Answers1

14

This is a common problem with tons of documentation on the web. A very informative discussion I've found on (1). Be aware that this problem only belongs to a wifi client connection that you want to brigde with another wifi client connection to a remote access point (e.g. uplink to an internet router). Bridging an access point (wlan0/ap0) together with a wired or wireless uplink (eth0/wlan0) is possible.

In general there are mostly 3 ways you can "bridge" a wifi client interface.

1. real bridging on OSI layer 2 would be the best solution. But wifi needs additional information in the ip header for this. Many router uses this for WDS (Wireless Distribution System) (2) but need an additional address field enabled in the ip header. You usually can do this with:

rpi3 ~$ sudo iw dev wlan0 set 4addr on

But you will get the error message:

command failed: Operation not supported (-95)

that just means what it say. The built-in wifi device of a Raspberry Pi does not support it (6). So you have to look for workarounds.

2. NAT (Network Address Translation) on OSI layer 3. This is what you have found and tried to setup. An alternative setup you can also find at Access point as WiFi repeater, optional with bridge. But @Thomas Guyot-Sionnest commented (3):

4addr as described in other answers is certainly the best way when supported by the adapter/driver, but not all of them does. NAT might work for some things, but getting proper communication both ways on the lan will become problematic (ex. connecting a printer or accessing other IoT devices on the other side of the NAT). Anything relying on broadcast/multicast (ex. auto-discovery, bonjour) will fail through the NAT.

Seems you are running into this trouble. I think the best alternative is to use

3. Proxy ARP on OSI layer 3. I suggest you look at Workaround for a wifi bridge on a Raspberry Pi with proxy arp and try it because:

Using Proxy ARP permits the bridged clients to be part of the existing network and supports bidirectional traffic, e.g. for a server or printer. DHCP and mDNS will also work using the appropriate helpers (4).


references:
[1] Bridging wlan0 to eth0
[2] https://en.wikipedia.org/wiki/Wireless_distribution_system
[3] https://serverfault.com/a/863241/458473
[4] https://wiki.debian.org/BridgeNetworkConnectionsProxyArp
[5] https://en.wikipedia.org/wiki/OSI_model
[6] Raspberry PI 3 MODEL B - Wireless Bridge to ethernet

Ingo
  • 40,606
  • 15
  • 76
  • 189