In my Linux network I am unable to reach my docker containers from the host they are running on, over a dedicated macvlan network. All other connections from to this macvlan net
You can do this by doing the following:
ip link add foobar link enp7s0 type macvlan mode bridge
ip addr add 192.168.9.252/32 dev foobar
ip link set foobar up
ip route add 192.168.9.228/32 dev foobar
Where:
enp7s0 - Name of your physical adapter
192.168.9.252/32 - Genuine new IP on your network
192.168.9.228/32 - IP of the container using macvlan
Please be aware that this will not survive reboots, so you will need to script it to run each reboot or use another method to make it persisten