Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Samba share is on Ubuntu 8.04
Samba config is below:

# Name mangling options
;   preserve case = yes
;   short preserve case = yes

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

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

        comment = Public Directory
        path = /home/public
        # inherit permissions = no
        # public = yes
        read only = no
        # writeable = yes
        # force create mode = 0775
        # force directory mode = 6775
        # force user = nobody
        # force group = users
        guest ok = yes
        guest only = yes

Out put from samba error log when I try to connect to the share over vpn:

[2011/04/07 15:01:23, 0] lib/access.c:check_access(327)
  Denied connection from  (
[2011/04/07 15:01:23, 1] smbd/process.c:process_smb(1062)
  Connection denied from
[2011/04/07 15:01:23, 0] lib/access.c:check_access(327)
  Denied connection from  (
[2011/04/07 15:01:23, 1] smbd/process.c:process_smb(1062)
  Connection denied from
[2011/04/07 15:01:31, 0] lib/access.c:check_access(327)
  Denied connection from  (
[2011/04/07 15:01:31, 1] smbd/process.c:process_smb(1062)
  Connection denied from

I'm trying to access this share on Windows 7.
If anyone request any other information I'll post here: When connecting via VPN my ip will be 10.0.1.x
On site it would be 10.0.0.x
IPTABLES -L shows no rules set up

share|improve this question
up vote 3 down vote accepted

The error log is pretty clear :

Connection denied from
Denied connection from  (

I guess the VPN clients are not in the same subnet as the lan, and there is some kind of ACL on the samba server to deny request from clients that are not on your lan.


looking at your other question regarding this issue, your lan appears to be in The client is in ?). The network acl issue make sense.


This should be Samba access-lists, not iptables. If iptables were blocking, the packets would have been dropped and nothing appeared in the logs.


Try to add the following in your smb.conf :

hosts allow =

and reload samba. This should allow networks and to access the shares.

share|improve this answer
I checked the iptables and I didn't see any rules, is there something else that could be set up to block out of the range? – evolvd Apr 7 '11 at 19:18
I like where this is going! Where can I look up the samba access-list? – evolvd Apr 7 '11 at 19:23
that was the magic! For future reference will samba only allow for connections with the same subnet by default? – evolvd Apr 7 '11 at 19:28
samba will allow all requests from the two aforementioned /24. – petrus Apr 7 '11 at 19:30
Well I meant with is it the default action of samba to only allow connection from the subnet that it is currently in? – evolvd Apr 7 '11 at 19:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.