LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 11-20-2009, 02:56 AM   #1
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 43

Rep: Reputation: 15
Restrict by using hosts.deny


Hi,

Is it possible to use hosts.allow and hosts.deny files to restrict all access? For example,consider the following content of hosts.deny file of 192.168.0.1

ALL: ALL

Will it restrict the access of 8080 port of192.168.0.1 from 192.168.0.2?
 
Old 11-20-2009, 04:05 AM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Mageia1 KDE openbox
Posts: 2,854
Blog Entries: 33

Rep: Reputation: 142Reputation: 142
Hi, as far as I know, the hosts.x files work together.

hosts.deny ALL:ALL, denies all that are not listed in hosts.allow

But that's all I know about it.

There are other tools I use to manage what ports are open to what ip addresses.

Like iptables and squid (proxy server)

I suggest you look into these programs.

Regards Glenn
 
Old 11-20-2009, 07:52 AM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by masatheesh View Post
Hi,

Is it possible to use hosts.allow and hosts.deny files to restrict all access? For example,consider the following content of hosts.deny file of 192.168.0.1

ALL: ALL

Will it restrict the access of 8080 port of192.168.0.1 from 192.168.0.2?
tcpwrappers work only for applications that have the libwrap module compiled in.
to find out, run ldd /path/to/executable | grep libwrap

the example you have above would restrict access to any apps with libwrap compiled in from 192.168.0.1

Like glennspref says - you are better off using iptables.
 
Old 11-22-2009, 11:11 PM   #4
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks for centosboy and GlennsPref
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Feisty: hosts.allow hosts.deny not present Thane Ubuntu 1 07-08-2007 01:16 PM
/etc/hosts.deny/hosts.allow have no effect on sshd access bganesh Linux - Security 4 05-04-2006 08:06 PM
Adding shell commands to hosts.deny and hosts.allow ridertech Linux - Security 3 12-29-2003 03:52 PM
How to restrict only one user can use telnet in /etc/hosts.deny? lzyking Linux - Software 2 02-12-2003 07:19 PM


All times are GMT -5. The time now is 02:02 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration