Linux && Win2k

Chris Jones linux at stow-jones.co.uk
Fri Feb 11 18:53:34 UTC 2005


Johnathan Bailes wrote:

>On Wed, 09 Feb 2005 17:45:33 +0000, Oded Hassidi <odedh13 at hotmail.com> wrote:
>  
>
>>Hi
>>
>>How the hell can I access a Linux share through the Win2k system?
>>Can it be done? Is it through SAMBA? If yes how?
>>
>>I'm a newbie,
>>
>>Thanks
>>
>>    
>>
>
>By the way you can even do it all gui.  Add the share with the gui
>samba config tool and then activate the services in the Services gui
>but here is the real gotcha all the way around with Samba:
>
>http://fedoranews.org/tchung/samba/
>
>Check this out though it is focused on sharing out a printer.  
>
>The part that is crucial is the iptables part.
>
>You can easily with no issues and little hassle set samba up but you
>got leave a hole in the firewall or you are going to have no joy.
>
>3. Configure iptables - Add following rules to your iptables to accept
>NETBIOS session service from Windows.
>
>$ sudo vi /etc/sysconfig/iptables
>
>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
>-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 139 -j ACCEPT
>
>$ sudo /sbin/service iptables restart
>
>  
>
Johnathan,

I read somewhere on the web that other ports also need opening for 
Samba. The following rules exist in my firewall for that purpose:

-A INPUT -p udp -m udp -m multiport -s 192.168.0.0/255.255.255.0 -d 
192.168.0.3 -j ACCEPT --dports 137,138
-A INPUT -p tcp -m tcp -m multiport -s 192.168.0.0/255.255.255.0 -d 
192.168.0.3 -j ACCEPT --dports 139,445
-A INPUT -p udp -m udp -s 192.168.0.0/255.255.255.0 -d 192.168.255.255 
--dport 137 -j ACCEPT
-A INPUT -p udp -m multiport -d 192.168.0.3 -j DROP --dports 137,138
-A INPUT -p tcp -m multiport -d 192.168.0.3 -j DROP --dports 139,445

Samba has worked without problem using those rules for some months now.

-- 
Chris Jones




More information about the users mailing list