I’ve created a router with my RP4 for learning purposes, but here is my question.
I’m running static default IP on the lan side and created a WiFi access point to bridge with the lan.
I’m using a mini Mac that is sharing WiFi via Ethernet to the raspberry pi.
It’s bridging directly to the Mac mini. DHCP on the WiFi access point is dolling out subnet 192.168.3.*. When I ssh into 192.168.3.1, it’s actually the Mac mini. Then from the Mac mini, I can ssh into 192.168.1.1
Problem being, while devices connecting to this new access point can get through to the outside world, the raspberry pi itself is just bridging without any connection to the internet, and I can’t update / install other packages.
My networking skills are lacking, which is why I’m playing around. Some help with fixing along with decent documentation would be greatly appreciate.
Chances are that the ethernet port (eth0) is currently part of br-lan.
You need to remove it from br-lan and then create a new interface like this:
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
If that doesn't fix the issue, let's look at your config:
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
As expected, eth0 is currently associated with br-lan and there is no wan network interface.
First, remove eth0 from the bridge so it looks like this:
config device
option name 'br-lan'
option type 'bridge'
the create a new network interface for the wan:
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
I'm not sure why, but your wan firewall zone is also not quite right (you must have changed it relative to the defaults). It should normally look like this:
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'wan'
option masq '1'
option mtu_fix '1'
And this forwarding rule should be deleted:
Once those are done, reboot the device an your downstream wifi devices should have internet access via the Pi > Mac > main network/internet.
You're welcome.
There are some trolls, indeed. Not many, but a few for sure.
Is it possible you could link me some documentation on some of this. I started learning linux based about 4 years ago after 30 years of only Windows. And I'm ashamed to say, I've neglected the network side on both sides.
Especially the firewall misconfig you mentioned. I set the input to allow thinking it would fix my problem before coming here.
I'd like to learn my way through this. Knowledge is power.