]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/hosts.allow
Added following modes:
[FreeBSD/FreeBSD.git] / etc / hosts.allow
1 #
2 # hosts.allow access control file for "tcp wrapped" apps.
3 # $FreeBSD$
4 #
5 # NOTE: The hosts.deny file is not longer used.  Instead, put both 'allow'
6 #       and 'deny' rules in the hosts.allow file.
7 # see hosts_options(5) for the format of this file.
8 # hosts_access(5) no longer fully applies.
9
10 #        _____                                      _          _ 
11 #       | ____| __  __   __ _   _ __ ___    _ __   | |   ___  | |
12 #       |  _|   \ \/ /  / _` | | '_ ` _ \  | '_ \  | |  / _ \ | |
13 #       | |___   >  <  | (_| | | | | | | | | |_) | | | |  __/ |_|
14 #       |_____| /_/\_\  \__,_| |_| |_| |_| | .__/  |_|  \___| (_)
15 #                                          |_|                   
16 # !!! This is an example! You will need to modify it for your specific
17 # !!! requirements!
18
19
20 # Start by allowing everything (this prevents the rest of the file
21 # from working, so remove it when you need protection).
22 # The rules here work on a "First match wins" basis.
23 ALL : ALL : allow
24
25 # Wrapping sshd(8) is not normally a good idea, but if you
26 # need to do it, here's how
27 #sshd : .evil.cracker.example.com : deny 
28
29 # Prevent those with no reverse DNS from connecting.
30 ALL : PARANOID : RFC931 20 : deny
31
32 # Allow anything from localhost
33 ALL : localhost : allow
34 ALL : my.machine.example.com : allow
35
36 # Sendmail can help protect you against spammers and relay-rapers
37 sendmail : localhost : allow
38 sendmail : .nice.guy.example.com : allow
39 sendmail : .evil.cracker.example.com : deny
40 sendmail : ALL : allow
41
42 # Exim is an alternative to sendmail, available in the ports tree
43 exim : localhost : allow
44 exim : .nice.guy.example.com : allow
45 exim : .evil.cracker.example.com : deny
46 exim : ALL : allow
47
48 # Portmapper is used for all RPC services; protect your NFS!
49 # (IP addresses rather than hostnames *MUST* be used here)
50 portmap : localhost : allow
51 portmap : .nice.guy.example.com : allow
52 portmap : .evil.cracker.example.com : deny
53 portmap : ALL : allow
54
55 # Provide a small amount of protection for ftpd
56 ftpd : localhost : allow
57 ftpd : .nice.guy.example.com : allow
58 ftpd : .evil.cracker.example.com : deny
59 ftpd : ALL : allow
60
61 # You need to be clever with finger; do _not_ backfinger!! You can easily
62 # start a "finger war".
63 fingerd : ALL \
64         : spawn (echo Finger. | \
65          /usr/bin/mail -s "tcpd\: %u@%h[%a] fingered me!" root) & \
66         : deny
67
68 # The rest of the daemons are protected. Backfinger and log by email.
69 ALL : ALL \
70         : severity auth.info : spawn (/usr/bin/finger -l @%h | \
71          /usr/bin/mail -s "tcpd\: %u@%h[%a] tried to use %d  (denied)" root) & \
72         : twist /bin/echo "You are not welcome to use %d from %h."