1999-03-28 10:47:26 +00:00
|
|
|
#
|
2000-01-25 11:25:59 +00:00
|
|
|
# hosts.allow access control file for "tcp wrapped" applications.
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1999-03-28 10:47:26 +00:00
|
|
|
#
|
2000-03-28 17:28:56 +00:00
|
|
|
# NOTE: The hosts.deny file is deprecated.
|
|
|
|
# Place both 'allow' and 'deny' rules in the hosts.allow file.
|
2000-01-25 11:25:59 +00:00
|
|
|
# See hosts_options(5) for the format of this file.
|
|
|
|
# hosts_access(5) no longer fully applies.
|
1999-03-28 10:47:26 +00:00
|
|
|
|
2004-06-06 11:46:29 +00:00
|
|
|
# _____ _ _
|
1999-11-25 03:00:44 +00:00
|
|
|
# | ____| __ __ __ _ _ __ ___ _ __ | | ___ | |
|
|
|
|
# | _| \ \/ / / _` | | '_ ` _ \ | '_ \ | | / _ \ | |
|
|
|
|
# | |___ > < | (_| | | | | | | | | |_) | | | | __/ |_|
|
|
|
|
# |_____| /_/\_\ \__,_| |_| |_| |_| | .__/ |_| \___| (_)
|
2004-06-06 11:46:29 +00:00
|
|
|
# |_|
|
1999-11-25 03:00:44 +00:00
|
|
|
# !!! This is an example! You will need to modify it for your specific
|
|
|
|
# !!! requirements!
|
|
|
|
|
1999-03-28 10:47:26 +00:00
|
|
|
|
|
|
|
# Start by allowing everything (this prevents the rest of the file
|
|
|
|
# from working, so remove it when you need protection).
|
1999-04-08 19:08:53 +00:00
|
|
|
# The rules here work on a "First match wins" basis.
|
1999-03-28 10:47:26 +00:00
|
|
|
ALL : ALL : allow
|
|
|
|
|
|
|
|
# Wrapping sshd(8) is not normally a good idea, but if you
|
|
|
|
# need to do it, here's how
|
2004-06-06 11:46:29 +00:00
|
|
|
#sshd : .evil.cracker.example.com : deny
|
1999-03-28 10:47:26 +00:00
|
|
|
|
2001-08-18 14:22:52 +00:00
|
|
|
# Protect against simple DNS spoofing attacks by checking that the
|
|
|
|
# forward and reverse records for the remote host match. If a mismatch
|
|
|
|
# occurs, access is denied, and any positive ident response within
|
|
|
|
# 20 seconds is logged. No protection is afforded against DNS poisoning,
|
|
|
|
# IP spoofing or more complicated attacks. Hosts with no reverse DNS
|
|
|
|
# pass this rule.
|
1999-03-28 10:47:26 +00:00
|
|
|
ALL : PARANOID : RFC931 20 : deny
|
|
|
|
|
2000-05-05 08:31:59 +00:00
|
|
|
# Allow anything from localhost. Note that an IP address (not a host
|
2001-03-20 21:02:39 +00:00
|
|
|
# name) *MUST* be specified for rpcbind(8).
|
2006-02-16 14:46:03 +00:00
|
|
|
ALL : localhost 127.0.0.1 : allow
|
2006-03-17 18:54:44 +00:00
|
|
|
# Comment out next line if you build libwrap without IPv6 support.
|
2006-02-16 14:46:03 +00:00
|
|
|
ALL : [::1] : allow
|
2006-08-29 09:20:48 +00:00
|
|
|
#ALL : my.machine.example.com 192.0.2.35 : allow
|
1999-03-28 10:47:26 +00:00
|
|
|
|
2000-07-19 13:05:58 +00:00
|
|
|
# To use IPv6 addresses you must enclose them in []'s
|
2006-08-29 09:20:48 +00:00
|
|
|
#ALL : [fe80::%fxp0]/10 : allow
|
|
|
|
#ALL : [fe80::]/10 : deny
|
|
|
|
#ALL : [2001:db8:2:1:2:3:4:3fe1] : deny
|
|
|
|
#ALL : [2001:db8:2:1::]/64 : allow
|
2000-07-19 13:05:58 +00:00
|
|
|
|
1999-03-28 10:47:26 +00:00
|
|
|
# Sendmail can help protect you against spammers and relay-rapers
|
|
|
|
sendmail : localhost : allow
|
2006-08-29 09:20:48 +00:00
|
|
|
#sendmail : .nice.guy.example.com : allow
|
|
|
|
#sendmail : .evil.cracker.example.com : deny
|
1999-03-28 10:47:26 +00:00
|
|
|
sendmail : ALL : allow
|
|
|
|
|
1999-08-03 14:52:46 +00:00
|
|
|
# Exim is an alternative to sendmail, available in the ports tree
|
|
|
|
exim : localhost : allow
|
2006-08-29 09:20:48 +00:00
|
|
|
#exim : .nice.guy.example.com : allow
|
|
|
|
#exim : .evil.cracker.example.com : deny
|
1999-08-03 14:52:46 +00:00
|
|
|
exim : ALL : allow
|
|
|
|
|
2001-04-26 13:43:02 +00:00
|
|
|
# Rpcbind is used for all RPC services; protect your NFS!
|
2014-03-06 17:33:27 +00:00
|
|
|
# Rpcbind should be running with -W option to support this.
|
1999-11-25 03:00:44 +00:00
|
|
|
# (IP addresses rather than hostnames *MUST* be used here)
|
2006-08-29 09:20:48 +00:00
|
|
|
#rpcbind : 192.0.2.32/255.255.255.224 : allow
|
|
|
|
#rpcbind : 192.0.2.96/255.255.255.224 : allow
|
2001-03-20 21:02:39 +00:00
|
|
|
rpcbind : ALL : deny
|
1999-04-08 19:08:53 +00:00
|
|
|
|
2002-02-06 20:39:36 +00:00
|
|
|
# NIS master server. Only local nets should have access
|
2006-06-01 14:14:58 +00:00
|
|
|
# (Since this is an RPC service, rpcbind needs to be considered)
|
2002-02-06 20:39:36 +00:00
|
|
|
ypserv : localhost : allow
|
2006-08-29 09:20:48 +00:00
|
|
|
#ypserv : .unsafe.my.net.example.com : deny
|
|
|
|
#ypserv : .my.net.example.com : allow
|
2002-02-06 20:39:36 +00:00
|
|
|
ypserv : ALL : deny
|
|
|
|
|
1999-03-28 10:47:26 +00:00
|
|
|
# Provide a small amount of protection for ftpd
|
1999-04-08 19:08:53 +00:00
|
|
|
ftpd : localhost : allow
|
2006-08-29 09:20:48 +00:00
|
|
|
#ftpd : .nice.guy.example.com : allow
|
|
|
|
#ftpd : .evil.cracker.example.com : deny
|
1999-03-28 10:47:26 +00:00
|
|
|
ftpd : ALL : allow
|
|
|
|
|
|
|
|
# You need to be clever with finger; do _not_ backfinger!! You can easily
|
|
|
|
# start a "finger war".
|
|
|
|
fingerd : ALL \
|
|
|
|
: spawn (echo Finger. | \
|
|
|
|
/usr/bin/mail -s "tcpd\: %u@%h[%a] fingered me!" root) & \
|
|
|
|
: deny
|
|
|
|
|
2000-02-17 04:52:23 +00:00
|
|
|
# The rest of the daemons are protected.
|
1999-03-28 10:47:26 +00:00
|
|
|
ALL : ALL \
|
2000-02-17 04:52:23 +00:00
|
|
|
: severity auth.info \
|
1999-03-28 10:47:26 +00:00
|
|
|
: twist /bin/echo "You are not welcome to use %d from %h."
|