Connected IP shows remote address, not local
I'm running OpenVPN and have a number of subnets and firewall ports open. For example, let's say my OpenVPN subnet is 10.0.120.0/24 and my domain name is foo.org. My workstation IP, before the OpenVPN connection is 188.8.131.52, for example.
When I make an OpenVPN connection back home to foo.org, my IP, if I do a 'what's my ip' search, is my home IP address, which makes sense. It's not passing traffic through the 184.108.40.206 connection for web browsing or anything like that. However, the problem exists if I start to look at the apache logs on a server that has a firewall port open on it. So, for example, if I connect to https://foo.org after I made the openvpn connection, my IP in the apache logs is 220.127.116.11 instead of the 10.0.120.2.
Is there a way to tell OpenVPN to use the 10.0.120.2 IP instead of the 18.104.22.168 IP that it's showing when I make that connection? Something makes me think that I can't but was wondering if anybody knows what I'm talking about and if there's a setting to change for it.
You'd need to change your DNS such that OpenVPN clients would talk to a DNS server that returns the internal IP address for "foo.org" when they look it up.