I would like to have one single app route all its traffic via a VPN.
To achieve this I'd like to use 2 containers (A:VpnClient and B:MyApp) where B uses the network of A.
The 2 containers run seperately just fine, both set up as custom apps. Now I just need the network sharing as well :)
Here's how I'd specify it with docker compose:
I simply don't know how to define this in the custom app networking section... or anywhere else for that matter:
I'm running TrueNAS-SCALE-24.04-BETA.1 on a HP ProLiant Gen8 Microserver with 10GB RAM
So far I have decided against trying the following things:
- Creating a bridge on my NIC. I did that in an attempt to set up wireguard (wg-easy) and encountered some issues with the K8 cluster to the point where I could not remove the bridge again later. Since I have the non-custom apps running nicely on K8 without any bridges now, I'd rather not mess with it, if I can avoid it.
In theory I'd have a 2nd NIC I could use for this, but setting that up cleanly for this purpose is not something I know how to do.
- Forcing docker-compose on the system. The docker-in-docker setup simply does not strike me as particularly desirable so far. I would like to stick to supported solutions as closely as possible. Also, since my server is on the lower end in terms of performance, as much as I can I'd like to keep it simple :)
Hopefully y'all have some good solutions?
Thanks in advance!
To achieve this I'd like to use 2 containers (A:VpnClient and B:MyApp) where B uses the network of A.
The 2 containers run seperately just fine, both set up as custom apps. Now I just need the network sharing as well :)
Here's how I'd specify it with docker compose:
Code:
services: vpn: cap_add: - NET_ADMIN ports: - '5800:5800' # Port for 'app' container app: network_mode: service:vpn depends_on: - vpn
I simply don't know how to define this in the custom app networking section... or anywhere else for that matter:
I'm running TrueNAS-SCALE-24.04-BETA.1 on a HP ProLiant Gen8 Microserver with 10GB RAM
So far I have decided against trying the following things:
- Creating a bridge on my NIC. I did that in an attempt to set up wireguard (wg-easy) and encountered some issues with the K8 cluster to the point where I could not remove the bridge again later. Since I have the non-custom apps running nicely on K8 without any bridges now, I'd rather not mess with it, if I can avoid it.
In theory I'd have a 2nd NIC I could use for this, but setting that up cleanly for this purpose is not something I know how to do.
- Forcing docker-compose on the system. The docker-in-docker setup simply does not strike me as particularly desirable so far. I would like to stick to supported solutions as closely as possible. Also, since my server is on the lower end in terms of performance, as much as I can I'd like to keep it simple :)
Hopefully y'all have some good solutions?
Thanks in advance!