
October 11th, 2011, 07:59 AM
|
 |
Lost in code
|
|
|
|
|
You can't do anything like this using DNS. DNS operates at a completely different level than ports do. As far as DNS is concerned ports do not exist, and short of reprogramming every client on the internet, there is no way you can change that. For this reason, you can neither block certain ports nor forward certain ports, it's all or nothing.
If you have control over abc.com you could configure the web server to not show the abc.com web page when visiting test.xyz.com.
If you don't have control over abc.com, then using a proxy is an approach that will work. You could set up a VPS, map test.xyz.com to that VPS and then have a proxy server listening on port 5555. The proxy server can invisibly forward all requests to abc.com. The client will see all of their traffic going to/from test.xyz.com, and abc.com will also see all of its traffic going to/from test.xyz.com.
I've never configured a proxy for something like this before, so I don't really have any recommendations on how to do that.
Depending on the communication protocol of whatever program is connecting to the server you might need to build a custom proxy server for this. If it's standard HTTP then you're in luck, because most proxy servers are already designed to handle that.
|