Re: hosts.allow does not resolve names



Bit Twister <BitTwister@xxxxxxxxxxxxxxxx> writes:


I imagined it would work like man hosts.allow indicates

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´.

then looking through man -s 5 hosts_access the example

/etc/hosts.allow:
ALL: LOCAL @some_netgroup
ALL: .foobar.edu EXCEPT terminalserver.foobar.edu


would suggest it should work. :-D

Feel free to look through the rest of the thread for more info.


Several things come to mind. 1) It depends on what is implementing
tcpwrappers. Some programs link against libwrap, and this is what the
manpages above talk about. Some programs emulate tcpwrappers, but just
look at the hosts.* files and don't link libwrap. 2) RPC portmapper must
use IP numbers, not hostnames. It says this in the portmap manpage
here:

You have to use the daemon name portmap for the daemon name (even if the
binary has a different name). For the client names you can only use the
keyword ALL or IP addresses (NOT host or domain names).

3) You can still use tcpd with xinetd. Just turn off xinetd's libwrap,
and use right flags in the xinetd.conf file. server will be tcpd, and
use NAMEINARGS, NOLIBWRAP.



--
[** America, the police state **]
Whoooose! What's that noise? Why, it's US citizen's
rights, going down the toilet with Bush flushing.
http://www.wired.com/politics/security/news/2007/08/wiretap
http://www.hermes-press.com/police_state.htm
.



Relevant Pages

  • Re: sendmail and hosts_access(5)
    ... I am attempting to block an SMTP server with /etc/hosts.allow: ... For example, the pattern `.tue.nl' matches ... the host name `wzv.win.tue.nl' ... mat is zero or more lines with zero or more host name or ...
    (freebsd-questions)
  • Re: sendmail and hosts_access(5)
    ... Robert Huff wrote: ... A host name or address is matched if it matches any host name or address pattern listed in the named file. ... more lines with zero or more host name or address patterns separated by ...
    (freebsd-questions)
  • Re: Shell-Script Question
    ... "Holger Hoffmann" wrote in message ... > file, and if so, perform an action (e.g. ping a host or whatever). ... "grep -c" does not return the number of occurrences of a pattern ...
    (linux.redhat)
  • Re: NSA has massive database of Americans phone calls
    ... depends on hunger, temps, pass recent events, mood and a host of all ... Lather, rinse, repeat until no neurons remain. ... remains is the pattern of activity that formerly occurred between my ...
    (misc.news.internet.discuss)
  • Re: Block tcp/25 Services (telnet host 25)
    ... we can still connect to host with telenet host 25 ... I don't think that sendmail will drop the TCP connection on a libwrap ... denied host. ...
    (comp.unix.solaris)