LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-13-2001, 10:00 PM   #1
skopje909
LQ Newbie
 
Registered: Nov 2001
Distribution: Red Hat 6.2
Posts: 17

Rep: Reputation: 0
Hosts.allow file


Is there a way I can put a wildcard in this file? For example if I want to accept any connections from say "all.me.net.nz" Is this how I should enter it :
ALL:ALL@ME.NET.NZ:ALLOW

IF not then what is the syntax?
 
Old 11-14-2001, 02:12 PM   #2
WindozBytes
Member
 
Registered: Aug 2001
Location: CT, USA
Distribution: Mandriva 2008
Posts: 105

Rep: Reputation: 15
I've not used this much, but believe you can accomplish what you want by specifying the IP address

ALL: 123.45.67.890

Adding something like :ALLOW would be redundant since you're editing the HOSTS.ALLOW file; that's if it even worked....
 
Old 11-14-2001, 02:48 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Id like to add you can use hosts/netmasks and separate them with comma's as well for more fine-grained control:
example0: 110.1.0.0/16
example1: 110.1.24.0/24, 110.1.25.0/24, 254.1.2.132/32
or:
example2: ALL EXCEPT 127.0.0.1, 200.210.0.0/16

As a final note Id like to say this doesn't work automagically, the app has to be compiled with TCP-Wrappers support (like ./configure --with-libwrap) to take advantage of this.
 
Old 11-16-2001, 10:49 AM   #4
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Yes wildcards will work in TCP wrappers using the follow implementation.

The access control language implements the following patterns:

A string that begins with a `.´ character.
A host name is matched if the last components of its name match the specified pattern.
For example, the pattern `.tue.nl´ matches the host name `wzv.win.tue.nl´.

A string that ends with a `.´ character.
A host address is matched if its first numeric fields match the given string.
For example, the pattern `131.155.´ matches the address of (almost) every host on the Eindhoven University network (131.155.x.x).

Check out man hosts.deny for more info..

/Raz
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
hosts file? milesstandish Red Hat 2 11-02-2004 11:57 PM
PB with /etc/hosts file(s) ptreves Linux - Networking 0 09-10-2004 07:39 PM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 05:33 PM
/etc/hosts file plexi100 Linux - Newbie 4 10-16-2003 06:03 PM
/etc/hosts File Crashed_Again Linux - Newbie 7 02-01-2003 01:04 AM

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

All times are GMT -5. The time now is 02:29 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