Specifying the cfhttp IP address on a shared server

I am using CFHTTP to send data to my payment gateway (Protx).

Protx requires me to list the white IP that will send this request.

I am hosted on a shared server running Windows 2008.

This morning my hosting company assigned a new IP address to this server for a client that needs an SSL certificate. Since then, my CFHTTP mail comes from this new IP (which was not whitelisted by Protx).

My hosting company, being the least imaginative, doesn't know why this is and doesn't want to look further into it.

Does anyone know how I can tell which IP of the CFHTTP link will use to publish the data?

0


source to share


2 answers


what you essentially want to do is spoof your IP address passed to Protx.

this can be done using the cfhttparam tag.

<cfhttpparam type="header" name="host" value="">

      



ex.

<cfhttpparam type="header" name="host" value="10.1.1.1">

      

refer to the Nabble post for more information. also have a look at livedocs for cfhttpparam

+2


source


I don't think this is possible directly. CF will rely on the underlying OS to handle the TCP / IP request, so the OS will determine which IP address to use for the request. It might be possible to trick the IP into specifying the host headers, but I'm not sure how to do that or how effective it is.

First, I suggest you get Protx for the new IP whitelist.



Second, if you have a proxy, this can provide a solution. CFHTTP can use a proxy and you can have a proxy IP. This way, no matter what IP address is CFHTTP enabled, the Protx server will see the proxy server address.

+2


source







All Articles