Provide internet (wlan0) to a local network (eth0) with a raspberry pi 4

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Provide internet (wlan0) to a local network (eth0) with a raspberry pi 4

Post by /RaspberryPi »

I'm trying to provide internet to a local network using a Raspberry Pi 4.
I have the following setup:
- New vodafone wifi router with internet access (192.168.1.1) | wlan0 (192.168.1.1) - Raspberry pi 4 with pihole for DNS + DHCP | eth0 (192.168.2.1) - Old vodafone router with DHCP disabled - DNS set to 192.168.2.1 | - Windows 10 computer - 192.168.2.180 (I want internet here) I've read hundreds of articles about bridging wlan0 and eth0 but nothing could get the setup working. I think that's because I'm using the old vodafone router for the local network. (model: HGG2500)
I've seen 3 different approach to this issue:
  • hostadp (I've eliminated this one because I don't want to provide internet over wifi but over ethernet only)
  • br0 with bridge-utils
  • iptables masquerade
I've yet to find a working setup so far.
I can get the raspberry pi 4 to ping the windows PC and vice versa.
It's just that windows PC still has no internet access.
It can even find the pihole for DNS because I see the request for DNS in pihole logs.
So I'm just missing a detail and can't figure it out.
If you've done or seen a similar setup.
Please let me know.
Thank you.

submitted by /u/Thommasc
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”