samba – Accessing Samba Shares Over the Internet

internetsamba

What's a good, secure (ish) way to access a samba server over the internet?

My first thought is to just forward the necessary ports on the router to the samba server, but I'm not sure how secure that would be.

My second thought is to somehow tunnel over ssh.

I tried this for my second thought, but it didn't seem to work.

Best Answer

You're going to find out that the SMB protocol sucks-like-a-vacuum-cleaner over links that have high latency. You're better off using a different protocol to access the files like, say, WebDAV, rather than trying to run SMB over the 'net.

Whatever you do, use encryption. If you're going to do SMB, use a VPN protocol (OpenVPN, IPSEC ESP, PPTP, etc) to tunnel SMB across. If you're using WebDAV you can just use HTTPS as the transport.