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 12.4.1.20, 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 12.4.1.20 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 12.4.1.20 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 12.4.1.20 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.
Thanks!
-
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.