LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 777|回复: 2

启用了iptables,但Samba不能访问了

[复制链接]
发表于 2005-2-28 19:36:20 | 显示全部楼层 |阅读模式
规则如下:

Accept If input interface is not eth1   
Accept If protocol is TCP and TCP flags ACK (of ACK) are set   
Accept If state of connection is ESTABLISHED   
Accept If state of connection is RELATED   
Accept If protocol is UDP and destination port is 1024:65535 and source port is 53   
Accept If protocol is ICMP and ICMP type is echo-reply   
Accept If protocol is ICMP and ICMP type is destination-unreachable   
Accept If protocol is ICMP and ICMP type is source-quench   
Accept If protocol is ICMP and ICMP type is time-exceeded   
Accept If protocol is ICMP and ICMP type is parameter-problem   
Accept If protocol is TCP and destination port is ssh   
Accept If protocol is TCP and destination port is auth   
Accept If protocol is TCP and destination port is 10000   

请问如何配置才能让别的机器访问我的samba。。
谢谢!
发表于 2005-2-28 19:49:09 | 显示全部楼层
端口:137、138、139
服务:NETBIOS Name Service
说明:其中137、138是UDP端口,当通过网上邻居传输文件时用这个端口。而139端口:通过这个端口进入的连接试图获得NetBIOS/SMB服务。这个协议被用于windows文件和打印机共享和SAMBA。还有WINS Regisrtation也用它。

具体的你可以看看/etc/services下的文件 :
这是关于137.138.139 端口号的介绍:
netbios-ns      137/tcp                         # NETBIOS Name Service
netbios-dgm     138/tcp                         # NETBIOS Datagram Service
netbios-ssn     139/tcp                         # NETBIOS session service

qq11217404
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-28 20:01:11 | 显示全部楼层
多谢,解决,我加入如下两条规则:

Accept If protocol is UDP and destination port is 137:138   
Accept If protocol is TCP and destination port is 139

我搜了半天关键字: samba iptables 冲突 ....等等,结果没找到,我原来以为samba是不固定端口呢,ft。。晕了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表