Accessing database from laptop in hotel room

  • I am writing a vb program that accesses a sql server database.  I would like to run my program from a hotel connecting to  the sql server database  on home computer..  I had a tech come to my house to set up sql server to remote, but he said that I needed a static connection on my router vs a dynamic,  He suggested Remote Desktop in Windows 10 Pro.    I had another suggestion to use teamviewer,  Would you guys that remote in please let me know how you do it?  

    BTW, I just purchased a VPN for help with security.
    Thanks

  • What I used to do in situations like that is instead of getting a static IP from my ISP (which cost extra money) is to use a free DNS service (such as no-ip) but that was years ago and I am not sure if they are still around nor if that method is still recommended.

    Basically, No-IP was an application that would run on your desktop and provide a public DNS entry which allows you to connect to your computer remotely over RDP (remote desktop) or whatever method you preferred.  I used it for hosting a website, an FTP, and for RDP.
    Problem with this though is that I started getting hit with a lot of different port probes that my router was not happy with and it would frequently overheat and crash and I'd need to reboot it (roughly once per month it needed a reboot).

    Is your VPN a private VPN or a public VPN?  What I mean by this is are you hosting the VPN on your local computer or is it a cloud based VPN?  These serve 2 very different purposes.  If you have the VPN Server on your local machine, you should be able to just connect to the VPN from wherever you are and you shouldn't need to RDP or use team viewer.  If it is a VPN that you don't host, this doesn't help you connect at all.

    But to answer your question, it depends.  Are you running the VB application on your laptop OR are you running it on your desktop?  If you are going to run it on your laptop, remote desktop or teamviewer will not be required.  You just need to ensure you can talk to your desktop and that your VB application is coded properly to connect to the database.  But depending on what data is on the database, you likely don't want to have it publicly facing.

    If you have a cell phone with a data connection, you could try connecting your laptop to the cell phones hotspot and use that wifi to connect to your desktop and you can verify that you can connect to the SQL instance.  If you can connect from your hotspot, you should be able to connect via the hotel wifi.

    My checklist for verifying that the app would work would be something like this:
    1 - can I ping it?
    2 - can I telnet to the SQL port?
    3 - does the application connect?
    and as soon as one of those failed, you have different points you need to look at.  If ping fails, your laptop would be blocked from talking to the computer.  It could be firewall issue, router issue, or wrong name/IP.  If ping succeeds but telnet fails, you likely have a firewall related issue.  Telnet succeeding should just give you a big black command prompt window.  If it has a blinking cursor, it means it connected successfully.  And the last step, if the applciation fails to connect, you likely have your connection string wrong.
    In point number 3, "the application" is either your VB program OR the remote desktop tool.  It depends on where the vb program needs to be run from.
    I would do the above checks using the hotspot first and if they succeed, then I'd turn on the VPN and try it again on the hotspot before testing it in a different site.

    BUT even with that being said, the hotel may end up blocking specific outbound ports in their firewall and that may end up blocking you from accessing your system.
    Plus hotel wifi I have found that some hotels have very spotty wifi in the rooms, but good wifi in the lobby.  AND the hotel wifi is shared by all of the guests.  So you may get horrid speeds when using hotel wifi or may even have your connection drop.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Good list above. I've avoided setting this up, as it an be a pain, but here's what I'd do.

    1. Need to get some VPN on your home side. You don't want an open connection. There are ways to do this cheaply, like https://www.howtogeek.com/221001/how-to-set-up-your-own-home-vpn-server/
    2. Need to ensure your router allows VPN software through, if this is not built in. This might also require setting the VPN for access to your home PC's IP. That should be static for this to easily work. Name resolution can work,but it can also be flaky at times.
    3. May need dynamic DNS to ensure you can get to your home VPN/router from the outside world. When you look to connect, your router's public IP can change, especially with power cycles, but it could otherwise change. Many routers can work with dynamic DNS to update an address like homevpn.voiceofthedba.com (my domain).
    4. Need VPN software on your laptop to connect home.
    5. Fingers crossed the hotel doesn't block VPN. Most don't, but this can happen.

    Alternatively, I'd say this.
    1. Use a VCS for capturing your code. Git is free, and you can zip up all your repo's code (or use something like GitHub/Visualstudio.com/Bitbucket to store your code. Then you can access this anywhere.
    2. Use PoSh or a batch file to  backup your SQL database and copy it to your laptop. If this is a small app, without data, you could easily store a few backups on OneDrive/Dropbox. Easy to then update/restore your db on your laptop. Much simpler.

  • One other thing I often do is check the phone. A lot of them still have the Ethernet port for a connection which can be faster and more secure than WiFi.

    Sue

  • I use Neorouter to create a VPN for this, easy to setup and free to home users.

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply