Copy link to clipboard
Copied
I have one CF server that has a range of 20 IP addresses. Our SQL Server is behind a firewall and we need to give it an IP address to allow access from the CF server to the SQL server. CF is not picking the first IP or the last, it seems to have just picked one random IP address.
How do we configure or setup ONE IP for CF to use when communicating with our SQL SERVER?
Please advise on any help & suggestions.
Thank you!
Ernie
Copy link to clipboard
Copied
If you're using DSN connections, then you determine which IP address the SQL server is using for connections, go into CFAdmin Data Sources, add a DSN using the MS SQL driver, and then edit the DSN connection, giving it the dbname, IP address, port, schema, login and pw for the db server and the schema that you want that DSN to connect to.
If you're not using DSN connections, then you'll have to look that up. I don't know how to do DSN-less connections.
HTH,
^_^
Copy link to clipboard
Copied
I use the CF ADMIN > Datasources to add/manage the database. The IP address that we enter is the IP address of the SQL SERVER (behind the firewall) and it works just fine. The communication between the CF SERVER and the SQL SERVER work great. That's not the problem.
The question is: How does the CF SERVER decide which IP to use to initiate the communication to our SQL SERVER. For example, our CF SERVER has a range of IP's from .210 - .234. When we do a packet monitor to see what traffic is going INTO THE SQL SERVER we notice that the CF SERVER is using .232 as the source to talk to our SQL SERVER. So where do we configure that source IP that CF uses? The interesting thing is that CF ADMIN is not even using .232 it's another one of the IP's.... so how do we figure out how to modify that source IP that CF picked to communicate with our SQL server?
Hope that makes sense.
Thanks for any help you have to offer.
Copy link to clipboard
Copied
Take a look at the windows command line "netsh" SkipAsSource option to skip all the source IPs except the one you want. I had to use this to get our SMTP service and CF web services to respond on a specific IP address.
http://www.confusedamused.com/notebook/source-ip-address-preference-with-multiple-ips-on-a-nic/
Note the caveat/bug regarding Server 2012:
http://blogs.technet.com/b/rmilne/archive/2013/08/27/skipassource-flag-cleared-in-windows-2012.aspx
This is also worth a read (adding a static route):
Copy link to clipboard
Copied
Copy link to clipboard
Copied
What OS are you running the server on? If it's windows, it uses the lowest IP address in the TCP stack.
example. I have a server with an ip of 10.0.10.100 but it has a virtual website of 10.0.10.20 as well as 10.0.10.200
All outbound connections come from 10.0.10.20. This is a windows thing, not a cold fusion thing. If I ping another
server from this server, it comes from the .20 address as well.
--Evan
Copy link to clipboard
Copied
Hi Evan -
I'm using Windows Server 2008 R2. It does NOT USE the lowest IP address in the TCP stack. The range assigned to the box is .210 - .234 and for some reason, (based on our packet monitor), CF is using .232
Where would CF 9 pick and/or how do we explicitly assign what IP CF should use when communicating with our SQL SERVER through our firewall?
Ernie