Skip to content

Strange network behaviour when using bridge and macvlan network together with publish port #22718

Answered by JSkold
JSkold asked this question in Q&A
Discussion options

You must be logged in to vote

This is not an issue with podman, it's a routing issue.

The routing table in the container with the above setup will look something like:

default via 10.95.0.1 dev eth1 proto static metric 100
default via 192.168.1.1 dev eth0 proto static metric 100
10.95.0.0/16 dev eth1 proto kernel scope link src 10.95.0.26
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.147

Since the bridge network uses DNAT the incoming packets still has source address 192.168.1.20. Response packets will then be routed via eth0 in this case, regardless of which interface they came from. I wrongly assumed that response packets would be sent back on the same interface they came from.

There are some soluti…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JSkold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant