I am wondering on the feasibility of this setup.
I want to selectively proxy some DNS entries. For example, I want most DNS queries to resolve normally, but I want example.com to go through my proxy server. Furthermore, my proxy server is not in my office (it's in my data center).
The solution I have imagined comes in two parts:
First, use BIND as a caching DNS server, and overwrite or force example.com to point to my proxy server. I assume this can be done? I am not very experienced with BIND configuration.
Second, use Squid to proxy all requests received that target example.com to the REAL example.com IP. I want to proxy http requests and other protocols that hit the right ports. So for example, I would also want to proxy ssh if it is done through port 80 for example. Can Squid work as this sort of proxy, or can it only work as an http proxy?
So for example the end result would look something like this. For the initial DNS query:
+----+ >--dns query example.com---> +-----------+
| PC | | my-server |
+----+ <----return my-server IP---< +-----------+
Then the the PC is "fooled" into thinking that example.com points to my server, instead of the real example.com. So this happens:
+----+ >--http://example.com--> +-----------+ >----> +------------------+
| PC | | my-server | | REAL example.com |
+----+ <----return content----< +-----------+ <----< +------------------+
Is this setup feasible? What configuration directives should I investigate to do the hard part?