Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everybody. I need your help as soon as possible. I have my debian firewall with iptables and i need to get access through samba server.
My global configuration in samba server seems like this:
Quote:
[global]
log file = /var/log/samba/log.%m
guest account = nobody
socket options = TCP_NODELAY IPTOS_LOWDELAY
obey pam restrictions = no
interfaces = 192.168.10.1
encrypt passwords = yes
#smb ports = 139
passdb backend = smbpasswd
smb passwd file = /etc/samba/smbpasswd
dns proxy = no
workgroup = fincyt
os level = 20
security = share
syslog = 0
panic action = /usr/share/samba/panic-action %d
max log size = 1000
bind interfaces only = true
allow hosts = 192.168.10.2
read raw = yes
write raw = yes
max xmit = 65535
dead time = 15
And my iptables rules are:
Quote:
iptables -A INPUT -p tcp --dport 139 -m state --state NEW -s 192.168.10.2/24-j ACCEPT
iptables -A INPUT -p tcp --dport 445 -m state --state NEW -s 192.168.10.2/24 -j ACCEPT
iptables -A INPUT -p udp --dport 137 -m state --state NEW -s 192.168.10.2/24 -j ACCEPT
iptables -A INPUT -p udp --dport 138 -m state --state NEW -s 192.168.10.2/24 -j ACCEPT
Aside from that it appears in your smb.conf you only want host 192.168.10.2 to access this server so you should be using -s 192.168.10.2/32 in your iptables commands.
Thanks a lot for the link elfenlied. However, I'm still stuck as this problem. I can´t get to connect to my samba server at all. When i look for the logs there is nothing to see......
What's your workgroup name in the Windows?I think udp don't have the 'state',so maybe you should change these iptables statements,and try again.
And is there any other iptables rules in the samba server?
Yes vp0619520 is right you should probably have both NEW and ESTABLISHED in your rules unless you have that somewhere else, the other thing I would try is turning off iptables for the moment. Verify that samba works then at least you know what it is that you have to fix to get it working.
Try stopping iptables first, and see if you can access your samba. If you can then it's likely to be a iptables problem, if not then it's possibly samba related.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.