So we are setting up and testing new internal systems, using Docker to deploy OpenVPN, Jenkins, and bind all on the same host. We want to restrict access to only come from traffic that originates from our VPN.
For our other internal systems (on different hosts), this works as expected. We can configure ufw to restrict based on the IP of our VPN server, and it works as expected, meaning we can't access when off the VPN, and we can when on the VPN.
However, for the services running within Docker on the same host as our OpenVPN server, traffic never appears to come from the VPN. Connected or not, it always appears to be from the actual IP address of the remote (connecting) client.
OpenVPN is setup using the popular Docker OpenVPN image. We're using the defaults, which means all traffic is supposed to be routed over the VPN connection.
What am I missing/forgetting?