I am trying to set up a local proxy for an SSL-based (HTTPS) service. The proxy will need access to the clear-text of the content going in both directions (for compliance reasons). I have control over the server certificate, as well as complete control over the proxy and its certificate.
I understand that this is effectively a man-in-the-middle attack and therefore exactly what SSL is supoosed to prevent, but I'm wondering if this sort of setup is possible to do with some certificate magic and local DNS redirection. If possible, I would like to configure the SSL certificates such that when connections go to service.something.com from the LAN, they go to the proxy, but when they originate in the rest of the internet they go directly to service.something.com.
Is this possible? If so how would I do it? Thanks.
EDIT: It seems that people may be downvoting this question because they think I am doing something shady. I am not. I am simply trying to enable a compliance department to do the monitoring necessary to satisfy legal requirements. I'm sorry if you still don't agree with this, but without it, the company would not be allowed to use the service.