Live data from Hacker News

Raspberry Pi WiFi to ethernet bridge

willhaley.com

21–30 of 67 posts

Re: Raspberry Pi WiFi to ethernet bridge

#22

This can also be set up graphically using OpenWRT (which is a lighter-weight OS if you just want to do some networking and not use the Pi for anything else. I should note that while the onboard WiFi is 802.11ac, I've never seen it get more than 60-70 Mbps in my own testing (in a variety of network environments), so if you want more speed, you might want to get an old n or ac router and flash it with OpenWRT instead.

Yes, those speeds are roughly consistent with what I got in my speed tests here :)

You (and others in these comments) have suggested using OpenWRT as an alternative. I suppose one advantage of the approach outlined in the submitted article is that you can still use the pi for other tasks using the normal raspberry pi OS, instead of installing the OpenWRT OS.

Re: Raspberry Pi WiFi to ethernet bridge

#23

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?

Has anyone tried this and successfully blocked ads from services like YouTube and Hulu? uBlock works on my computer but I've always had a hard time with pihole. It'll work for like a day then go back to serving ads.

Make sure nothing is changing your DNS. You may need to set your router to push the pihole as your DNS and tell any programs to use system DNS.

Re: Raspberry Pi WiFi to ethernet bridge

#24

Earlier quoted context omitted.

Has anyone tried this and successfully blocked ads from services like YouTube and Hulu? uBlock works on my computer but I've always had a hard time with pihole. It'll work for like a day then go back to serving ads.

Make sure nothing is changing your DNS. You may need to set your router to push the pihole as your DNS and tell any programs to use system DNS.

I've checked that my router continues to point to the pihole (no fallbacks, though I've tried with fallbacks and no difference). I also setup the pihole with cloudflare. I'm just always confused because it seems like some people have absolutely no problem and there's others in my camp and the former just stop after "just follow the directions." I even remember the LTT video mentioned this specific problem.

Re: Raspberry Pi WiFi to ethernet bridge

#25

Earlier quoted context omitted.

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/

May I ask where I might start learning things like this?

Stand up a few useful services around the home and harden them. Stuff like Plex/Emby, Paperless-ng, *arr's, etc. Self hosting is addicting and one of the best teachers.

Re: Raspberry Pi WiFi to ethernet bridge

#26
I've thought of doing something similar, but exposing it as a USB-Ethernet adapter instead. The Pi 4 (and Pi Zero W) support USB OTG. It looks simple enough with a single command with Linux USB gadget to create the network interface usb0.

Then you can do power and data over the single USB port.

Re: Raspberry Pi WiFi to ethernet bridge

#27
post #21

Is this a "true" bridge (i.e. every Ethernet segment coming in on one end is transformed into an appropriate 802.11 frame and vice versa)? If not, is that possible using an RPi?

Not every IEEE 802.1 Ethernet frame can be converted to an IEEE 802.11 WiFi frame. To do that you would need some type of tunnel to the Ethernet fabric.

Re: Raspberry Pi WiFi to ethernet bridge

#28

Earlier quoted context omitted.

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/

May I ask where I might start learning things like this?

The tutorials provided by VPS providers like Digital Ocean are a pretty good way to learn how to setup a VPN or any other common webservice yourself. They have a pretty well maintained library:

https://www.digitalocean.com/community/tutorials/how-to-crea...

etc. I'd also second a recommendation of wireguard over OpenVPN - it's far simpler to configure too.

Re: Raspberry Pi WiFi to ethernet bridge

#30
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.

I'm bridging for an IPTV box now TP-Link Archer C20i that cots me $10.

It also make 2nd AP connected wireless to first one for extending WiFi coverage. Not a perfect setup but works few months without issues.

Post reply on HN