Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a linux box behind a Linksys firewall router. I have a Windows machine outside the firewall that would like to access Samba sharing on the linux box. The Windows machine has a static ip address.

Can I enable port forwarding on the firewall such that it will only forward requests from the ip of the one Windows machine? What is the most secure approach to enable Samba share through the firewall?

share|improve this question

Usually not this way, most routers let any source get at a particular port on the external IP via port forwarding, if you only want one source IP to get to that port you may have to a proper router or flash the Linksys with one of the more configurable open source firmware options if available.

share|improve this answer

Consider setting up a Virtual Private Network (VPN), for example OpenVPN for a secure, encrypted channel between the machines. The specific configuration will depend on your own requirements.

A good starting point is:

share|improve this answer

Port forwarding is the safest way to accomplish what you want. With the static ip of the client you can also make rules for the firewall additionally.

share|improve this answer
How do you suggest this is done then? – Chopper3 Apr 19 '11 at 21:45
Thanks for voting me down and writing nearly the same. I mentioned the optional possibility to bind access to a dedicated ip. And by the way, my 20bucks (it's a linksys) router is able to forward ports in dependency of the requesting clients ip. – ansi_lumen Apr 20 '11 at 9:06
I didn't vote you down and we were actually writing at the same time, there was only two mins between our posts. – Chopper3 Apr 20 '11 at 9:08
And while we're at it. I missed the qualified hint for the dramatic security risk of unencrypted SAMBA connections over the internet. – ansi_lumen Apr 20 '11 at 9:09
Sorry again, chopper3. Love, PC, Unity! – ansi_lumen Apr 20 '11 at 9:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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