[Samba] Block samba hosts by domain

L A Walsh samba at tlinx.org
Thu Nov 10 21:14:17 UTC 2016


Erick Ocrospoma wrote:
>
>
>         [root at server0 ~]# nslookup 172.25.0.100
>         Server:         172.25.0.254
>         Address:        172.25.0.254#53 
>
>          
>
>     ---
>        as the above shows: not only does nslookup on the ip not
>     return the name, but it returns the IP for a different machine!
>
>
> ​That's the DNS server IP.
---
    I figured as much... still not what you want though...;-)
>>  
>
>
>        If you have 'dig', the "-x" option should do the trick.
>
>      dig -x 172.25.0.100
>
>
>> [root at server
> ​0​
> ~]# dig -x 172.25.0.10
> ​0​
>
> ;; QUESTION SECTION:
> ;
> ​​
> 10
> ​0​
> .0.25.172.in-addr.arpa.      IN      PTR
>
> ;; ANSWER SECTION:
> 10
> ​0​
> .0.25.172.in-addr.arpa. 86400 IN      PTR     desktop.example.com 
> <http://desktop.example.com>.
---
    Is that the answer you expected? 

I wasn't sure what you were trying to do, since your subject
said you were trying to block hosts by domain, whereas your
smb.conf file only seemed to have a "hosts allow":

    hosts allow = 172.25.0. .example.com

...that would only work for a user named 'susan' who has validated
against the the server.  I.e. When you go to map 'data' to a drive,
I believe you would need to 'connect using different credentials',
and enter susan's creds in the dialog.







More information about the samba mailing list