Access my PC through the internet

2

0

i have a belkin dd-wrt router. It connects to dyndns. I am able to access my Windows XP PC throught the internet, and i have already enabled RDP by forwarding port 3389 to my local IP-address. It works.

How do i enable access to my hard drive or any shared directory? I would like to access the share like this:

smb://dyndnsalias.com/HostnameOfMyPC/Share

Is this even possible?

mrt181

Posted 2009-10-25T12:06:39.660

Reputation: 785

Answers

2

As others have stated, your router would have to be configured to forward the appropriate ports to the computer with the shares. You will be opening up a huge security hole, so consider other options.

Almost anything will be better than SMB/CIFS over the open internet. Personally I'd use SCP/SFTP to take advantage of SSH security. You could even tunnel SMB/CIFS over SSH... in theory. The only thing you'd need to do is 1) setup an SSH server on your computer, and 2) forward SSH ports from your router to the computer.

Now, to your question.

Your URI smb://dyndnsalias.com/HostnameOfMyPC/Share won't work because you have two hostnames in there, dyndnsalias.com and HostnameOfMyPC. In theory (and depending on where you were trying to use this), the format would be:

smb://dyndnsalias.com/Sharename
         ^               ^
         |               |
 OR      + host/ip       + share
         |               |
         V               V
\\dyndnsalias.com\Sharename

You can use any of these for the host/ip field:

  • your dyndnsalias.com alias (resolves to your public IP),
  • your public IP,
  • your HostnameOfMyPC, if and only if you've added it to your hosts file with your public IP (this would go in /etc/hosts on a Unix system, or C:\windows\system32\drivers\etc\hosts on Windows):

    x.x.x.x    HostnameOfMyPC
    

quack quixote

Posted 2009-10-25T12:06:39.660

Reputation: 37 382

3

You could try Hamachi: https://secure.logmein.com/products/hamachi2/ No port forwarding or dyndns needed!

DaMacc

Posted 2009-10-25T12:06:39.660

Reputation: 318

well - as good as this looks, security is debatable when anyone at another company can connect in at will and do what they want! – William Hilsum – 2009-10-26T01:43:03.340

2

This is possible, but I would not recommend it at all as it can leave your machine open to attack.

I would personally look in to using something like either an FTP Server such as Filezilla or a HTTP Server such as IIS or Apache.

This will allow you to share the root of your hard drive or any folder and have authentication - along with being a lot safer.

William Hilsum

Posted 2009-10-25T12:06:39.660

Reputation: 111 572

Could you tell me how to do it with smb. I need to access XP and Vista – mrt181 – 2009-10-25T13:00:54.143

2You simply enable file sharing then forward all the required ports for SMB - however I *REALLY* would not recommend this - all the last few big viruses / exploits scan for open SMB shares on the internet and propagate this way. – William Hilsum – 2009-10-25T13:08:17.463

You can easily install Filezilla Server on Windows, then you can access it using any computer, either using the builtin ftp command, or using Filezilla client. – Rich Bradshaw – 2009-10-25T13:10:11.127

ok, but which command do i have to use (smb://???????) – mrt181 – 2009-10-25T13:14:34.277

FTP is a protocol that is independent of the OS and SMB protocol, simply install Filezilla server, set up a user and shared folder to your hard drive then anywhere, any OS (usually built in to the os), go to run or an address bar and type ftp:computer_ip login, and you can see your files - for additional features, I recommend using filezilla client (available from that site I linked to) – William Hilsum – 2009-10-25T13:18:35.600

2Most ISP's block the SMB ports anyway so even if you open port SMB over the Internet it probably still won't work. Some ISP block FTP and HTTP as well so you may have to run on a non default port. If possible I would use SFTP (OpenSSH server) since it's secure and ISP are less likely to block it. – shf301 – 2009-10-25T17:56:09.147

1

Another option, since you are running dd-wrt is to use OpenVPN (you'll need the vpn build of dd-wrt). This allows you to setup a VPN between your remote machine and your local network (i.e. your remote machine will behave as if it's on your home network). This will allow you to access all of the resources on your home network remotely and securely.

Once you have OpenVPN configured on your router you'll need to install and configure clients on any remote machine you want to use.

skarface

Posted 2009-10-25T12:06:39.660

Reputation: 1 088

1

You need to forward port 445 to that machine. Seriously though, as others have said, don't do it. You're asking for trouble with viruses/exploits, etc.

MDMarra

Posted 2009-10-25T12:06:39.660

Reputation: 19 580