LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-21-2017, 01:30 AM   #1
JohnGomez84
LQ Newbie
 
Registered: Apr 2017
Location: BCN
Distribution: Ubuntu
Posts: 3

Rep: Reputation: Disabled
hosts.deny not blocking hosts to use NFS


Hi, Im setting up a NFS server in Ubuntu 16.04 for my IT studies and i have to configure hosts.deny and hosts.allow to deny a pc from using nfs, I can't deny it in /etc/exports (that would be way easier) because I have to do it with hosts.deny.
I've read in internet that newer versions of NFS doesn't use TCP Wrappers so hosts.deny and the other one are useless now but my teacher says that you can still use it...
Anyway, this is my code in hosts.deny:
Code:
ALL: 192.168.8.2
And this is my code in hosts.allow:
Code:
ALL: ALL
If someone know why it isn't blocking the hosts I would appreciate some help.
(Sorry for my eng I'm from Spain)
 
Old 04-21-2017, 02:37 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,359
Blog Entries: 3

Rep: Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767
Quote:
Originally Posted by JohnGomez84 View Post
I've read in internet that newer versions of NFS doesn't use TCP Wrappers so hosts.deny
If that version of NFS actually does still support old TCP Wrappers, then you'll have to add the daemons by name ( rpcbind mountd nfsd statd lockd rquotad ) to hosts.deny, and maybe also to hosts.allow

See:

Code:
man hosts_access
Fewer and fewer daemons still support use of tcpd (TCP Wrappers) any more. If this is not a history or archaeology class then it might be better to use iptables instead. tcpd is from the years before even ipchains was available.
 
1 members found this post helpful.
Old 04-21-2017, 02:49 AM   #3
JohnGomez84
LQ Newbie
 
Registered: Apr 2017
Location: BCN
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: Disabled
Ok I'll try it right now, thanks man I really appreciate that help.
 
Old 04-21-2017, 04:07 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://ubuntuforums.org/showthread....6#post13459876
for details on how tcpwrappers work (or doesn't)

openssh < 6.6 = tcpwrapper works.
Lemme know.

Last edited by Habitual; 04-21-2017 at 04:10 AM.
 
Old 04-29-2017, 02:24 AM   #5
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
NFS is technically connectionless and uses UDP packets instead of a real TCP connection to a daemon, and so it doesn't go through tcpwrappers.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/hosts.deny not blocking hosts from using NFS - Centos m223464 Linux - Security 3 05-10-2012 08:54 PM
Access denied for NFS - but hosts.allow and hosts.deny seem OK royce2020 Linux - Networking 4 10-17-2011 10:44 PM
Question about NFS and /etc/hosts.{allow,deny} bonixavier Slackware 7 05-20-2011 07:39 PM
can't restrict sshd access through hosts.allow and hosts.deny but was working earlier farhan Linux - Security 4 04-18-2008 07:41 AM
deny.hosts does not work in blocking anything lexton Linux - Newbie 4 04-06-2004 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration