Hello everyone,
I have a question that might not be entirely commonplace. Is it possible in OpenWRT to create a second IPv4 gateway with internet access within the OpenWRT IPv4 network, which could then be used as a gateway in a Docker MacVLAN on a PC within the OpenWRT network?
Unfortunately, Docker has the annoying limitation with IPv4 that a gateway can only be used for one MacVLAN. This restriction doesn't exist with IPv6. And since I have two MacVLANs running, I could only assign the OpenWRT IP address as the gateway to one of them.
As long as everything is still running within my router network (Fritz!Box, without an OpenWRT router), I have a script running on the Docker host PC, which I start with SystemCtrl at every boot, and which creates a kind of "artificial gateway." However, this no longer works when I move the LAN cable used by the MacVLANs to my Nano Pi R5S running OpenWRT.
Before I go to all the trouble again and create new problems with scripts on the host PC, I thought maybe OpenWRT could provide a second IP address for a gateway so that the Docker containers in the MacVLAN can access the internet via IPv4. AdGuard Home needs this, for example, to update its blocklists. Nextcloud needs it to update weather data and apps. That's all I need.
Idea:
- 192.168.1.1
Gateway for MacVLAN 1 - 192.168.1.20
Gateway for MacVLAN 2
Is something like this possible in OpenWRT? If so, how do I configure it in the LuCI web interface?
This is roughly how I had it set up for my router (Fritz!Box) with my script.
Thanks in advance for any helpful tips!
Regards,
Mic.