Hi,
I've set up docker containers which use macvlan interfaces.These include pi-hole and a vpn server (softether). Everything works fine, except for one little thing: I can't reach the webinterface if I am connected from external via vpn. This is by design, because macvlan are isolated and can't communicate with it's parent device. But the different macvlan interfaces can communicate with each other. (I.e. the vpn-connection is filtered by pihole).
I found a solution how docker containers with macvlan interfaces could communicate with OMV - theoretically. The idea is to replace the physical interface with a macvlan interface and let all communication run through it. To achive this, /etc/netwokrs/interfaces needs to be modified.
Look here: https://www.reddit.com/r/docke…ommunicating_with/dqd16zx and here: http://infrastructuredevops.co…-2018/docker-macvlan.html
Unfortunately I don't know how to put this in Openmediavault (I am also a bloody linux noob).
OMV has control over the interfaces, so that they can't be edited directly (http://openmediavault.readthed…latest/various/files.html).
According to this post (Customize /etc/network/interfaces the OMV way [>= 1.11]) it is possible to add additional interfaces. But I'm not sure if it is possible to edit or override a existing interface....
Anyway, I created a new file "my-macvlan" in /etc/network/interface.d/ with the following content (since I use dhcp and want a static mac address I had to modify the template):
auto enp1s0
allow-hotplug enp1s0
iface enp1s0 inet manual
auto macvlan0
iface macvlan0 inet dhcp
dns-nameservers 192.168.1.1
dns-search fritz.box
pre-up ip link add macvlan0 link enp1s0 address: 6E:26:8F:C9:E3:C5 type macvlan mode bridge
pre-down ethtool -s $IFACE wol g
post-down ip link del macvlan0 link enp1so type macvlan mode bridge
Alles anzeigen
I restartet OMV afterwards but nothing changed. My /etc/network/interface remainded unchanged:
# Include additional interface stanzas.
source-directory interfaces.d
# The loopback network interface
auto lo
iface lo inet loopback
# enp1s0 network interface
auto enp1s0
allow-hotplug enp1s0
iface enp1s0 inet dhcp
dns-nameservers 192.168.1.1
dns-search fritz.box
pre-down ethtool -s $IFACE wol g
iface enp1s0 inet6 manual
pre-down ip -6 addr flush dev $IFACE
Alles anzeigen
Where did I make a mistake? Can this even work?