SOLVED Networking: App cannot reach other App with host networking enabled

Flachzange

Dabbler
Joined
Jul 10, 2022
Messages
16
Hi everyone,

I require one of my apps to run with host networking enabled (in order to get it assigned to a vlan). This container actually has two interfaces configured in host networking mode:
  1. Interface in subnet A (vlan)
  2. Interface in subnet B (standard subnet of truenas server and other clients). Assume it has address 192.168.1.240
So far so good. However, I cannot reach this particular app from any of the other containers by using the second interface's address 192.168.1.240. From all other clients and even the truenas host I can reach this address. Using the kubernetes internal DNS resolution, in this case "shinobi-ix-chart.ix-shinobi.svc.cluster.local", works also fine. While this is a proper solution for the majority of cases it does not seem to work with the wg-easy app to enable wireguard support.

Deploying the wg-easy container in "standard" configuration works well and I can reach all clients via the VPN in subnet B except the one service with host networking enabled, i.e. address 192.168.1.240. The Kubernetes internal DNS resolution does not work in this case.

Why is that the case and how can it be fixed?

Running wireguard as an app on the truenas host is only a temporary solution and should not be questioned now. It is more about the general question why an app with host networking enabled cannot be reached by a "native" app.

Appreciate your input!

Chris
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
I have an app using host networking that is reachable by other apps.

I think the trouble has to do with using the vlan rather than the host networking option.
 

Flachzange

Dabbler
Joined
Jul 10, 2022
Messages
16
Thanks. I know it might be tempting to go for the vlan. :D However, the same applies to a standard app that only has networking enabled in subnet B. I cannot reach / ping / ... this container from any other app running with native networking.

I mentioned the vlan about as this the reason for me to use host networking at all.
 

Flachzange

Dabbler
Joined
Jul 10, 2022
Messages
16
The solution here is the same as for the issue with the connection VM<->Host: Use a bridge interface for the host network
 
Top