I want to mount shared folders from my linux server on the network to appear like normal drives in Windows.

The server has a private network on one side and a public network (which happens to give me a semi-static IP on the internet) on the other side. I am using both networks and want a samba-like filesharing ability.

Why not samba:

  • it has no encryption
  • it spams the public network
  • it is said to be very unsafe

At the moment I use sftp mainly and I would love to have some shares integrated into windows, is this possible? If there is a way to secure and harden samba, especially adding encryption - transfer and login - it would be fine too though.

Edit: To make it more clear, I allready use WinSCP so I am not looking for an FTP-like client software but for an integration comparable to samba. (mount network share, assign drive letter)

Edit2: I think further Explanation is needed how my network looks like:

I live in one of the universities dorm appartements, and can access the universities network from my room. My server/router (same box) is connecteted to the network which hands out an IP via DHCP which is accessible through the internet, too. Thats why I call it semi-static, it basically does not change unless I switch my server off for more than a few days. As that box works as my router I have a private network on the other side too.

As long as I am within the reaches of the universities network (read most of the day) I want to access my servers files. Simple sollution would be to allow all internal adresses of the universities network, but I do not trust this network to be safe. I still want access to the files, not through a client bases sollution like WinSCP or FileZilla offer, but a true integration as a filesystem.

  • 1
    Re "it spams the public network": This is not related to file sharing at all; the nmbd daemon is used for name resolution and can be simply disabled. Re "it is said to be very unsafe": In terms of what? Exploit count? All of them are specific to Windows. Lack of authentication? Authentication is supported by SMB since early 1990's. Encryption? Set up OpenVPN. – grawity Feb 1 '12 at 15:01
  • what is a semistatic IP? That still makes it dynamic in my mind. Nobody uses Samba over internet, cause its slow, but it works well in a home/corporate LAN. If you want to mount shares over internet. Samba Over SSH Tunnel also slow.. VPN is faster.. but also slow with rubbish internet.. FTP works well wherever on the net.. hence the invention of it. – Piotr Kula Feb 1 '12 at 15:08
  • @ppumkin: I edited my question. – Baarn Feb 1 '12 at 16:29
  • @grawity: I read multiple times that it is a bad idea to have a samba server on a machine that is directly connected to the internet. – Baarn Feb 1 '12 at 16:35
  • @WalterMaier-Murdnelch Please define directly connected to the internet.. You mean a lan cable plugged into the mode/router?That poses no threat for incomming hacks. Or, explicilty setting the machine as DMZ and exposing all the ports.. but still you have to disable iptables on linux.. It is not that simple.- But if you do that its your own fault for leaving the garage door wide open with a sign saying keys are in the glove box. PS. Please do not steal. – Piotr Kula Feb 2 '12 at 12:49

This question on StackOverflow might be of interest.

Dokan seems to be an interesting way to mount network locations more safely.

  • Link is dead. Has Dokan ceased to exist, or just moved to another site? – DarenW Feb 18 '18 at 18:03
  • @DarenW I found another link. Can't really judge the validity, as this topic is a bit old. – Der Hochstapler Feb 19 '18 at 12:26

Quick fixup would be sftp / scp / rsync or anything over SSH More permanent solution would be OpenVPN server running on dyndns address and allowing transparent but fully encrypted access.


You could also try http://code.google.com/p/win-sshfs/ sshfs for Windows based on Dokan.

  1. Samba has no encryption because the smb protocol has no encryption, and if you want windows to read your shares that's what you're stuck with.
  2. You can configure things so samba only uses one interface
  3. Sure, if you leave it so it's available to the public network. Keep it private, and you're fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.