简体   繁体   中英

SQL Server 2008 R2 : remote access with Static ip

I am trying to connect to a SQL Server 2008 R2 remotely and I have successfully connected my laptop with SQL Server 2008 R2 (server). Now I am using the IP address (dynamic) as server name, as I am in same network. Will it be possible to connect to a SQL Server with static IP? If yes, then can I use the static IP with in my home network?

It depends in how you connect to your work site.

If you use a VPN, it's as if you was at your work site, and then you can safely connect.

If you are not using a VPN, that's not so easy: the SQL Server IP will probably be a private IP (like 168.xxx or 10.xxx). If this is the case, this IP only works in your work site network, and it's not accesible from the outside work. To have acces to this IP you'd need to do two things:

  • guess what your work site router WAN IP address is. Ie you need to know the IP of your work site router as you see it from the internet (which is not the same as you see it from the work site). Besides, it's possible that this IP is not fixed, so you'd need a dynamic DNS to be able to know it at any time

  • create a NAT or PAT mapping in the router so that when you try to access a given port of the internet IP of your router, it transfer the traffic to the internal SQL Server

The VPN solution is much better because, if you use hte second solution, anyone on the internet could tamper your SQL Server (right as you do it).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM