HELP! Shell commands in hosts.allow, hosts.deny

HELP! Shell commands in hosts.allow, hosts.deny

Post by Shaw Walke » Mon, 12 May 1997 04:00:00



I'm trying to set up my /etc/hosts.allow and hosts.deny
to create log entries and e-mail me when someone tries to
access my Linux machine from the outside. I'm using tcpd,
but my shell commands in these files won't execute. I'm
using the syntax in the hosts_access man page, Linux
Network Administrator's Guide, etc:

# hosts.allow
in.fingerd : ALL : \

        /bin/mail -s "%d-%h" root &

# hosts.deny
ALL EXCEPT in.fingerd : ALL EXCEPT LOCAL, 192.168.27. : \


When I do "tcpdchk -v" I keep getting the message:

/etc/hosts.allow, line 10: bad option name: "echo"
/etc/hosts.deny, line 16: bad option name: "echo"

What's the deal here? Can somebody point me in the
right direction?  Thanks,
--S. Walker

 
 
 

HELP! Shell commands in hosts.allow, hosts.deny

Post by Tom Rya » Mon, 12 May 1997 04:00:00


try using the "twist" command.. i.e.

twist echo "blah..

: I'm trying to set up my /etc/hosts.allow and hosts.deny
: to create log entries and e-mail me when someone tries to
: access my Linux machine from the outside. I'm using tcpd,
: but my shell commands in these files won't execute. I'm
: using the syntax in the hosts_access man page, Linux
: Network Administrator's Guide, etc:

: # hosts.allow
: in.fingerd : ALL : \

:         /bin/mail -s "%d-%h" root &

: # hosts.deny
: ALL EXCEPT in.fingerd : ALL EXCEPT LOCAL, 192.168.27. : \


: When I do "tcpdchk -v" I keep getting the message:

: /etc/hosts.allow, line 10: bad option name: "echo"
: /etc/hosts.deny, line 16: bad option name: "echo"

: What's the deal here? Can somebody point me in the
: right direction?  Thanks,
: --S. Walker
--
______________________________________________________________
Tom Ryan                                   Voice: 609 225-6361
Microcomputer Analyst                        Fax: 609 225-6487
Rutgers School of Law - Camden

 
 
 

HELP! Shell commands in hosts.allow, hosts.deny

Post by s.. » Tue, 13 May 1997 04:00:00




[stuff deleted]

># hosts.allow
>in.fingerd : ALL : \

>        /bin/mail -s "%d-%h" root &

># hosts.deny
>ALL EXCEPT in.fingerd : ALL EXCEPT LOCAL, 192.168.27. : \


>When I do "tcpdchk -v" I keep getting the message:

>/etc/hosts.allow, line 10: bad option name: "echo"
>/etc/hosts.deny, line 16: bad option name: "echo"

How about trying "twist echo" instead of "echo"? Caveat: I haven't tried
this myself, and I can't remember how and where I got this idea...

Quote:>--S. Walker

CU, Sico.
 
 
 

HELP! Shell commands in hosts.allow, hosts.deny

Post by ro » Mon, 19 May 1997 04:00:00



        another dimension with:


 >
 >[stuff deleted]
 >
 >># hosts.allow
 >>in.fingerd : ALL : \

[...]
 >How about trying "twist echo" instead of "echo"? Caveat: I haven't tried
 >this myself, and I can't remember how and where I got this idea...
 >

        No need to caveat, it works fine. here are some examples if you
        want to ax some spam in the process. It's overkill, but...
        Put sendmail in inetd and use the -bs switch (I logged all these
        junkmail delivery attempts in the last 2 weeks that way).

#
ALL:.comune.bologna.it:twist /usr/sbin/sendit.pl
ALL:UNKNOWN
ALL:131.162.2.
ALL:149.77.:twist /usr/sbin/sendit.pl
ALL:208.5.10.
ALL:208.5.119.
ALL:208.8.39.
ALL:208.193.224.
ALL:208.202.29.
ALL:208.200.248.
ALL:208.200.251.
ALL:209.14.30.
ALL:.olypen.com:twist /usr/sbin/sendit.pl
ALL:.grind.net:twist /usr/sbin/sendit.pl
ALL:.aecnet.com:twist /usr/sbin/sendit.pl
ALL:.equinox.net:twist /usr/sbin/sendit.pl
ALL: sweden-c.it.earthlink.net:twist /usr/sbin/sendit.pl
ALL: italy-c.it.earthlink.net:twist /usr/sbin/sendit.pl
ALL: germany-c.it.earthlink.net :twist /usr/sbin/sendit.pl
ALL: .llv.com:twist /usr/sbin/sendit.pl
ALL: .bbnplanet.com:twist /usr/sbin/sendit.pl
ALL: .barrnet.com:twist /usr/sbin/sendit.pl
ALL: .atl.bellsouth.net:twist /usr/sbin/sendit.pl
ALL: .juno.com:twist /usr/sbin/sendit.pl
ALL: .mediaone.net:twist /usr/sbin/sendit.pl
ALL: .crim.ca:twist /usr/sbin/sendit.pl
ALL: .teleglobe.net
ALL: .interbusiness.it
ALL: .mallmaster.com:twist /usr/sbin/sendit.pl
ALL:.acadiau.ca
ALL:.linknet.net
ALL:.wmrg.net
ALL:.llv.com
ALL:.cwi.net
ALL:.cwix.net
ALL:.rmaa.org
ALL:.ncaa.org
ALL:.epix.net
ALL:.anacapa.net
ALL:.agis.com:twist /usr/sbin/sendit.pl
ALL:.gi.com:twist /usr/sbin/sendit.pl
ALL:.agis.net
ALL:.comune.bologna.it:twist /usr/sbin/sendit.pl
ALL:.earthlink.net:twist /usr/sbin/sendit.pl
ALL:.covesoft.net
ALL:.mail199.net
ALL:.hk.net
ALL:.stake-your-claim.com:twist /usr/sbin/sendit.pl
ALL:.azdigital.com
ALL:.azlink.com
ALL:.success.com
ALL:.deshaw.com:twist /usr/sbin/sendit.pl
ALL:.shaw.net:twist /usr/sbin/sendit.pl
ALL:.connectamerica.com:twist /usr/sbin/sendit.pl
ALL:.ispam.com:twist /usr/sbin/sendit.pl
ALL:.merlin.net.au
ALL:.domain.com
ALL:.technicalplacement.com
ALL:.*promo.com:twist /usr/sbin/sendit.pl
ALL:.savetrees.com:twist /usr/sbin/sendit.pl
ALL:.cts.com
ALL:.usa.net
ALL:.quantcom.com:twist /usr/sbin/sendit.pl
ALL:.sallynet.com
ALL:voicehouse.com
## End of hosts.deny.

--
The typewriting machine, when played with expression, is no more
annoying than the piano when played by a sister or near relation.
                -- Oscar Wilde

 
 
 

1. HELP with tcp_wrappers hosts.allow hosts.deny

I've been going round and round with trying to get hosts.allow and deny
to restrict access from telnet and cant figure it out.  I've read the
man pages and searched the web.  I've tried all the examples but none
seem to work.

I want to deny telnet access from everyone but people in my domain.
This is what I have in hosts.deny:

in.telnetd: ALL EXCEPT .jps.net

I've tried

in.telnetd: ALL : DENY EXCEPT .jps.net

I've tried in.telnetd: ALL in hosts.deny and an entry in hosts.allow for
my domain and that still doesn't work.  Cany anyone help me out with
this?  So far whatever I do just denies telnet access from everyone.

2. System Troubles

3. host.allow and host.deny config help Please

4. NCSA, .htaccess & 501 error

5. help to delete file(hosts.allow,hosts.deny )

6. telnet....connection closed

7. linux traffic control tc token bucket parameters

8. hosts.allow /hosts.deny

9. Portmap not reading hosts.allow and hosts.deny?

10. How do hosts.allow and hosts.deny relate to ipchains?

11. hosts.deny / hosts.allow SunOS 4.1.4 ?

12. quation about hosts.allow hosts.deny