I've added my computer to my router's DMZ so all opened ports are accessible from the internet. I have a couple of Samba shares that currently have public read permission. I want all other computers on the local network to be able to access my Samba shares without a password. The moment someone tries to access them from outside the LAN, a password should be requested. Can someone help me with this?

  • 3
    You do realise, I hope, that the connection to your shares is not encrypted. So that all traffic over the link is open to sniffing? Windows shares are NOT DESIGNED to run over the WAN and you would be opening yourself right up to all sorts of hacks. – Julian Knight Jan 31 '13 at 11:43
  • That, and the speed... oh gods why? – Xyon Jan 31 '13 at 11:46
  • Jip, I realized that. I changed my shares to be non-public now – goocreations Jan 31 '13 at 15:41

As an experienced (>15 years) system/network administrator, I'd put to you that the idea of having SAMBA files world accessible strikes me as being an EXTREMELY bad one.

I suspect its not the answer you were looking for, but I'd suggest considering setting up a VPN (either on the SAMBA server or router, depending on your requirements), and only allowing SAMBA access from known IP's - including those on your VPN. (OpenVPN is relatively easy to set up, secure, and works with most OS's). [ If you need further flexibility, possibly run a web server on your SAMBA box and use .htpassword or a similar mechanism to limit access - but that will provide read-only access unless you focus effort on a more complex web setup ]

If you do want to go about having your computer/network permanently targeted by hackers through having SAMBA exposed to the world I'm reasonably sure that you could set up shares which are only accessible internally (no password), and another set of shares accessible externally (pointing to the same location and requiring a password)

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.