WinForm Client remote WAN Access configuration of SQL database

Source: Internet
Author: User

All types of learning sites do not provide a complete range of remote solutions in a detailed and simple approach. Also because it involves non-software development knowledge. Through careful study and practice, here to give a complete and comprehensive solution for the needs of netizens reference research.

(Original: Tang Fei qq:87671675, there are better suggestions can leave a message, or add QQ to learn from each other exchange. )

Accessing the SQL database server from an external network

The four-step demonstration is completed individually:

First, for the telecommunications, Unicom, mobile broadband provider requirements:

1, public network fixed IP or dial-up access to the public dynamic IP (some 100 IP addresses that start with the private IP address will not be able to achieve remote access, only with special domain name tool binding).

2, the public network dynamic IP binding domain name.

Second, the requirements of the router: Do virtual address forwarding

1, external 1433 port, internal 1433 port. Bind SQL Server LAN internal IP such as 192.168.1.120, protocol type: TCP.

2. No need to open the DMZ.

3. DDNS the domain name provided by the domain name vendor for the router support. Log in to the router to sign in the domain name vendor's required registration account and password. Note: A registered account may support multiple domain names on the domain name provider side. See 2 sheets.

Third, the Client debug folder, that is to be used in the field of the computer program client's folder, where the connection database configuration file requirements:

Need to modify server= server name \SQLExpress to: Public network fixed IP or domain name, 1433\sqlexpress. Note: a comma is not a colon between the domain name and the port . Don't make a mistake. This type of writing is placed inside the LAN to access the server.

Iv. configuration of server-installed SQL Express

1, Native clinet Client protocol TCP/IP default port is 1433, do not arbitrarily change. However, to manually set "enabled."

2, the most important: In the SQLExpress protocol, TCP/IP has several settings, only the TCP port in Ipall is set to 1433 to enable remote access to the database. (The above IP1-IP5 is also useless). See figure

See:

Now that the extranet client program in the WAN needs to complete the above 4 requirements, the SQL Server can be accessed anywhere in the Internet.

The following is a connection to the SQL Server for clients on the local area network, in the case of Windows Firewall enabled. Configure the relevant rules. (This firewall rule is not valid for WAN)

Assuming that the server is installing Win7 or WIN10, then the settings in the firewall:

Advanced Settings-A 1434 port type of UDP is created in the inbound rule. Upon completion, the local LAN client can break through the server firewall and Exchange data with the SQL Server via port 1434.

WinForm Client remote WAN Access configuration of SQL database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.