Thank you for your answers.
I have only one docker host; but now when i create a bridge network for a stack i bind it to a particular subinterface of the host as per default docker listen to all interfaces. For compose stacks i put the webserver in a macvlan (if it's more convenient) or a bridge in the dmz vlan and the others containers in another vlan network.
My authentik stack authenticates apps for lan or internet users and also apps only accessible from lan. For now its listening interface is in the lan but i wonder if i should move it to dmz. I'm also trying to force all apps through caddy and authentik to have an authentication and use the same hostname to access it whether i'm inside or outside.
The same goes for caddy. If i understood correctly caddy process is listening on all interfaces. But i think i don't really get the path of a packet.
Caddy listen on ports 80&443.
If the request comme from outside, it arrives on wan interface which caddy listens to. Then it processes the request to upstream server or forward the request to authenticating server depending on the authentication type (oauth or proxy).
For this request to be actually effective you need a firewall rule on wan interface to pass the pack to "this firewall".
If the request comes from the inside on the interface (LAN for now) where the user is. Then the request is processed as in the first case.
For this request to be actually effective you need a firewall rule on lan interface (or the interface on vlan where users resides) to pass the pack to "this firewall".
So if i'm correct when the reverse proxy is on the firewall itself you can't really put it in the dmz. The only thing i can do is move authentik to dmz and eventually change my users vlan from lan to another one.
Another thing i need to take care of is that the app with oidc provider need to contact the authentik server. For now as authentik is in the lan i have a firewall rule passing request from apps in the dmz with oidc provider to authentik server (not sure about that one as i don't which container of the stack actually makes the request).
For example i have a jellyfin docker in dmz which can't authenticate without such a rule (it's only one container).
But i have a nextcloud-aio (13 containers in a vlan bridge and the apache one in dmz bridge) which can authenticate without the rule.
Forget about that my authentik stack is still in a bridge network that is not bound to a particular interface so it listens to all. I consider this as a security hole and i have to modify my authentik bridge network so that it listens to only one interface.
I guess it's the danger to have a docker host with several interfaces.
I have only one docker host; but now when i create a bridge network for a stack i bind it to a particular subinterface of the host as per default docker listen to all interfaces. For compose stacks i put the webserver in a macvlan (if it's more convenient) or a bridge in the dmz vlan and the others containers in another vlan network.
My authentik stack authenticates apps for lan or internet users and also apps only accessible from lan. For now its listening interface is in the lan but i wonder if i should move it to dmz. I'm also trying to force all apps through caddy and authentik to have an authentication and use the same hostname to access it whether i'm inside or outside.
The same goes for caddy. If i understood correctly caddy process is listening on all interfaces. But i think i don't really get the path of a packet.
Caddy listen on ports 80&443.
If the request comme from outside, it arrives on wan interface which caddy listens to. Then it processes the request to upstream server or forward the request to authenticating server depending on the authentication type (oauth or proxy).
For this request to be actually effective you need a firewall rule on wan interface to pass the pack to "this firewall".
If the request comes from the inside on the interface (LAN for now) where the user is. Then the request is processed as in the first case.
For this request to be actually effective you need a firewall rule on lan interface (or the interface on vlan where users resides) to pass the pack to "this firewall".
So if i'm correct when the reverse proxy is on the firewall itself you can't really put it in the dmz. The only thing i can do is move authentik to dmz and eventually change my users vlan from lan to another one.
For example i have a jellyfin docker in dmz which can't authenticate without such a rule (it's only one container).
But i have a nextcloud-aio (13 containers in a vlan bridge and the apache one in dmz bridge) which can authenticate without the rule.
Forget about that my authentik stack is still in a bridge network that is not bound to a particular interface so it listens to all. I consider this as a security hole and i have to modify my authentik bridge network so that it listens to only one interface.
I guess it's the danger to have a docker host with several interfaces.
"