I want to host a couple of (dockerized) web applications (e.g. Keycloak, Nextcloud and Discourse). The servers I have to use have two network interfaces: eth1 and eth0.
eth1 is the production interface – this is where user's requests reach the server & applications. Easy enough.
eth0 is the administration interface – this is what I use to update packages/download docker images/etc. All traffic has to go trough a http-proxy (I think it's squid). Most of the times setting the HTTP_PROXY environment variable is enough to get it to work.
However, the web-applications sometimes need to use eth0 as well. For example, if a cron triggers some updates or emails. How do I tell my web applications to use eth0 and the proxy-server? Some Applications do not support proxies natively, so I figure I need to configure some clever networking on my RHEL8? Can I solve my issue with docker-daemon settings?
Can you point me in a direction? What do I have to look into? Could ip-tables solve my issue?
Thanks a lot! I am pretty new to this stuff and don't really know where to start—any hint is appreciated!