Live data from Hacker News

Raspberry Pi WiFi to ethernet bridge

willhaley.com

1–10 of 67 posts

Re: Raspberry Pi WiFi to ethernet bridge

#2
A couple of months ago, another setup for a wifi to ethernet bridge was posted here: https://news.ycombinator.com/item?id=26940521

I like Will Haley's setup better though, because it keeps everything in the same subnet.

The slowdown from the bridge is negligible, in my experience. After running 10 trials, I found that:

* median ping was 2.4% higher on the bridged pi

* median download speed was 3.6% slower on the bridged pi

* median upload speed was 0.1% slower on the bridged pi

More details about my setup and how I performed this speedtest: https://github.com/dasl-/pitools/tree/main/wifi-ethernet-bri...

Re: Raspberry Pi WiFi to ethernet bridge

#4
You can also do this with an old OpenWrt router, which also gets you a management interface and a gigabit Ethernet switch as part of the plastic box.

I used to have such a bridge (OpenWrt on Netgear WNDR3800 hardware) Velcro'd to the underside of a TV cart, so that an appliance on the cart that only had Ethernet and 2.4 GHz WiFi built-in could do a more reliable 5 GHz across the room.

Re: Raspberry Pi WiFi to ethernet bridge

#5
I might as well just dump this question in this thread:

Would this be easy to combine with openvpn? Basically what I'd like is to hook (say) my Apple TV into my pi by ethernet and then use the pi's wifi to connect to my router. Finally I'd like to be able to connect the pi to a VPN and have the Apple TV transparently use that connection. Is this straight-forward to achieve?

Re: Raspberry Pi WiFi to ethernet bridge

#6

I might as well just dump this question in this thread: Would this be easy to combine with openvpn? Basically what I'd like is to hook (say) my Apple TV into my pi by ethernet and then use the pi's wifi to connect to my router. Finally I'd like to be able to connect the pi to a VPN and have the Apple TV transparently use that connection. Is this straight-forward to achieve?

Yep, rather straight-forward. Little bit of iptables forwarding and you're all set:

  echo 1 > /proc/sys/net/ipv4/ip_forward
  iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
  iptables -A FORWARD -i wlan0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
  iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
I'd recommend wireguard[0] in preference to openvpn.

refs: [0]https://www.wireguard.com/

Re: Raspberry Pi WiFi to ethernet bridge

#7

I might as well just dump this question in this thread: Would this be easy to combine with openvpn? Basically what I'd like is to hook (say) my Apple TV into my pi by ethernet and then use the pi's wifi to connect to my router. Finally I'd like to be able to connect the pi to a VPN and have the Apple TV transparently use that connection. Is this straight-forward to achieve?

Some routers support acting as a transparent vpn client as well, particularly those with open linux firmwares.

Re: Raspberry Pi WiFi to ethernet bridge

#8

I might as well just dump this question in this thread: Would this be easy to combine with openvpn? Basically what I'd like is to hook (say) my Apple TV into my pi by ethernet and then use the pi's wifi to connect to my router. Finally I'd like to be able to connect the pi to a VPN and have the Apple TV transparently use that connection. Is this straight-forward to achieve?

Yes, but a better approach would be to enable forwarding on the pi and using the pi as a gateway.

Performance is probably the only reason you'd favor bridging over routing. A segmented network is a safer network.

Re: Raspberry Pi WiFi to ethernet bridge

#9

I might as well just dump this question in this thread: Would this be easy to combine with openvpn? Basically what I'd like is to hook (say) my Apple TV into my pi by ethernet and then use the pi's wifi to connect to my router. Finally I'd like to be able to connect the pi to a VPN and have the Apple TV transparently use that connection. Is this straight-forward to achieve?

Yep, rather straight-forward. Little bit of iptables forwarding and you're all set: echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT iptables -A FORWARD -i wlan0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE I'd recommend wireguard[0] in preference to openvpn. refs: [0] https://www.wireguard.com/

Great thanks for the info!

Re: Raspberry Pi WiFi to ethernet bridge

#10
post #4

You can also do this with an old OpenWrt router, which also gets you a management interface and a gigabit Ethernet switch as part of the plastic box. I used to have such a bridge (OpenWrt on Netgear WNDR3800 hardware) Velcro'd to the underside of a TV cart, so that an appliance on the cart that only had Ethernet and 2.4 GHz WiFi built-in could do a more reliable 5 GHz across the room.

And probably also a much better antenna.
Post reply on HN