I'm struggling to enable NTFS share between two Windows (XP and 7) hosts through a Linux firewall.

Here's my setup:

[XPMachine-LAN1]---------->[LINUX FIREWALL]---------->[Win7-LAN2]

What I want to do is to NAT the NTFS input from the XP machine to the same ports on the Win7 machine.

The problem is that when I try from the XP machine to open the network share \\LINUXFIREWALL then the firewall doesn't seem to be NATing the packets to the Win7 machine.

I've opened the standard NTFS/Samba ports like 135:139 and 445, some of them need UDP and the others TCP (details available on various sites).

However since I am running 2 different versions of windows I tried to google that to see if there would be a change between XP and 7 and that list is available on MS website : http://windows.microsoft.com/en-GB/windows7/Networking-home-computers-running-different-versions-of-Windows#section_2

My question is, if you are running 2 windows machine through a *nix box with iptables, can I ask what your iptables file looks like? Am I missing something?


  • Can you please post relevant rules in your iptables. And please provide some information on how do you come to know that firewall in not NATing the packets. More information you will provide better we can help you. Dec 5, 2011 at 19:11
  • Thanks a lot for your help, I really appreciate... Here is an example of the iptables rule I use : iptables -t nat -A PREROUTING -i eth0 -p udp --dport 137 -j DNAT --to
    – Bluz
    Dec 5, 2011 at 22:27
  • I am no iptables guru by any means, but I wrote the above rule a while ago to allow another network service on the exact same machines and it worked like a charm so I can't see why that same rule would not be suitable for NTFS shares...unless I don't have the complete list of all the ports involved....
    – Bluz
    Dec 5, 2011 at 22:27
  • I am guessing this is because the windows machine are running different versions of windows, XP and Seven, so the ports configuration looks a bit cranky here : windows.microsoft.com/en-US/windows7/…
    – Bluz
    Dec 5, 2011 at 22:27
  • But anyway, I am happy to deal with the MS side of things later.. For now I would really appreciate if someone can confirm that the iptables rule I am using here is suitable for that purpose, or if there's any better way to do it... Thanks a lot for your help! Bz.
    – Bluz
    Dec 5, 2011 at 22:28

1 Answer 1


The answer had nothing to do with Linux.

On Windows 7, if your network type is "home" then you can only share files with other Windows 7 machines. In order to be able to send files to machines running previous Windows versions you need to set your local network to "work".

It's not something I would have guessed, I bet I am not the only one here.

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.