Map a drive on one PC from a remote PC

Map a drive on one PC from a remote PC

I am working on mapping some drives from my home PC to my laptop that I travel with. They are not on the same network. I believe I can do this by either configuring a VPN, setting up my home PC as an FTP server, or even with SSH (tunneling?) in some way. I know my way around a computer, but I am not very knowledgeable about any of these three options, or even about networking in general (but am not completely ignorant).

My question is which of these methods is the easiest to implement securely, and what exactly do I need to do to ensure that I implement this method securely?

Both of my machines are running Windows 10.

答案1

Easiest method in my opinion would be port forwarding. This looks long and scary, but actually shouldn't be that hard to set up.

First, let's set up the server (your home computer). Assuming you want to share your whole drive- share the C: drive like you normally would to create a local share. Set up password protection however you want. Next you will need to make your home PC use a static IP address so your router can always find it in the same place. Some routers let you do this from within the router (called DHCP reservation). Otherwise, you will have to do this from windows. There's some good guides on how to do this online.

So! Your home PC is ready to go. Next step is to tell your router to forward incoming connections to it. From here on out, I'll use these IPs to avoid confusion. You can set up yours however you like:

  • IP of your router: 192.168.1.1

  • Static IP of your home PC: 192.168.1.101

  • Your public IP (this one): 144.4.44.444

First step is to find out your router IP (if you have not done so already). In command prompt, type ipconfig and take note of the default gateway address. Type this address in to the url box of a web browser (would be 192.168.1.1 in my example).
Next comes the port forwarding part. The easiest way I know of port forwarding is to just set up a DMZ. This sends all incoming requests to your home PC. It is slightly less secure, but easier. On my router, this setting is under Applications & Gaming. Enable it and put your home pc's address (192.168.1.101 in example). If you want to be a bit more secure, you can forward one port only with a guide. If you do this, you will need to connect to your server as something like 144.4.44.444:8000 in the future.

So now your router should be forwarding all incoming requests to your home PC. You mentioned noip.com. The purpouse of this is to be able to always connect even when your ISP changes your address (144.4.44.444). This should mean that you have already created a hostname (something like name.hopto.org) that forwards to 144.4.44.444.

Time to test it! Get off of your local network (go to work/school, a nearby Starbucks, or use 3G). Assuming you're using windows, go to the run dialog and enter \\name.hopto.org. If done correctly, you should be asked for login credentials and have access to your home share. Awesome! Map a network drive to that address. If it doesn't work, try going to \\144.4.44.444 and see if that works. If it does, then something is wrong with your noip.com config. Keep in mind that your 144.4.44.444 address may change, so make sure you test it shortly after confirming that it is correct.

Feel free to ask me if you have any questions!

相关内容