Connecting across a firewall

There are restrictions on connections when the client application is on one side of a firewall and the database server is on the other side. Firewall software may filter network packets according to network port. Also, it is common to disallow UDP packets from crossing the firewall.

Usually, you can connect through a properly configured firewall using the Host connection parameter and providing the database server address and port. If the database server is using the default port of 2638, the port is not required.

The following connection string fragment connects to a database server named myserver running on a computer at address serverhost using port 2020. No UDP packets are used because the Host connection parameter specifies the TCP/IP address and port.

Server=myserver;Host=serverhost:2020
 Firewalls that only allow certain client ports
 See also
 Example