PDA

View Full Version : Strange iptables and xp to linux samba share behaviour.



zod786
29th November 2008, 12:18 PM
Morning all.
Having an odd problem with my Fedora 9 - XP sharing via samba.
On my XP box I go to "My Computer" and try to map my network drive. In the "Folder" field I drop down the menu and highlight \\Fedora\linux-share.
When I click on finish I get an error saying the Network path \\Fedora\linux-share cannot be found. The firewall IPtables does have rules to allow for samba. When I turn off iptables I connect fine. When I turn iptables on again I can connect with no trouble. Everyday I have the same trouble. Whenever I reboot / switch on my network I can only map the network drive when I turn off and start iptables i.e



$ service iptables stop
$ service iptables start


As opposed to

$ service iptables restart

Once I have connected to linux-share from XP, I can disconnect and reconnect again. But If I try to reconnect after say 10 minutes I will get \\Fedora\linux-share cannot be found errors again.
I have no trouble seeing / sharing the XP share directory from my linux box though.

I include my iptables -L output and smb.conf files :



$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:microsoft-ds
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination




$ cat smb.conf

[global]

# ----------------------- Network Related Options -------------------------

workgroup = LINUX
server string = Samba Server Version %v
netbios name = FEDORA
hosts allow = 127. 192.168.
log file = /var/log/samba/log.%m
security = user

; username map = /etc/samba/smbusers
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
wins support = yes
wins server = 192.168.0.30
name resolve order = hosts wins bcast
max log size = 50
passdb backend = tdbsam
syslog = 1
syslog only = yes

#=========== Share Definitions ===========

[linux-share]

path = /home/share
valid users = zod
write list =
read only = yes
browseable = yes
; writable = yes
; available = yes


On the XP side I have set the WINS server to be my linux box (192.168.0.30).

Thanks.
zod