8

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.

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
    Commented Mar 18, 2018 at 10:57
  • This looks similar to raspberrypi.stackexchange.com/q/51057/33476 Commented Sep 14, 2021 at 11:10

1 Answer 1

16

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

3
  • Hey @Ingo, really thorough answer! I have a bridge that currently links wlan0(input) to eth0 (output) but as you stated won't work for adding 4addr. Just purchased a USB-WiFi dongle that will work for 4addr (confirmed the command works), are there any other setup steps I need to ensure I'm getting a Layer 2 instead of Layer 3 bridge?
    – cdubs
    Commented Dec 1, 2023 at 15:56
  • 1
    @cdubs I have to admit that I'm a bit out of the topic because of other projects. But I remember that I had verified the 4addr issue also with a dongle that supported it but can't remember details. For now I would try to setup a bridge as documented to connect two wired subnets and solve the problems step by step if possible.
    – Ingo
    Commented Dec 2, 2023 at 23:44
  • no problem at all, thanks for the reply! I’ll see what I can come up with
    – cdubs
    Commented Dec 3, 2023 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.