PLEASE NOTE THAT THIS FILE IS DEPRECATED AND WAS GIVEN FEW YEARS AGO AS AN EXAMPLE FOR CONFIGURATION OF MACOS X 10.0 REFER TO YOU OWN FILE/MAN PAGE/DOCUMENTATION FOR ACCURATE AND UP TO DATE INFORMATION. # # hosts.allow access control file for "tcp wrapped" applications. # $FreeBSD: src/etc/hosts.allow,v 1.8.2.3 2000/07/20 15:17:44 ume Exp $ # # NOTE: The hosts.deny file is deprecated. # Place both 'allow' and 'deny' rules in the hosts.allow file. # See hosts_options(5) for the format of this file. # hosts_access(5) no longer fully applies. # Start by allowing everything (this prevents the rest of the file # from working, so remove it when you need protection). # The rules here work on a "First match wins" basis. #ALL : ALL : allow # Wrapping sshd(8) is not normally a good idea, but if you # need to do it, here's how sshd : ALL : allow # Prevent those with no reverse DNS from connecting. #ALL : PARANOID : RFC931 20 : deny # Allow anything from localhost. Note that an IP address (not a host # name) *MUST* be specified for portmap(8). ALL : localhost 127.0.0.1 : allow #ALL : 192.168.10.36 : allow #ALL : 194.98.247.253 : allow # To use IPv6 addresses you must enclose them in []'s #ALL : [fe80::%fxp0]/10 : allow #ALL : [fe80::]/10 : deny #ALL : [3ffe:fffe:2:1:2:3:4:3fe1] : deny #ALL : [3ffe:fffe:2:1::]/64 : allow # Sendmail can help protect you against spammers and relay-rapers sendmail : localhost : allow #sendmail : .nice.guy.example.com : allow #sendmail : .evil.cracker.example.com : deny sendmail : ALL : deny # Exim is an alternative to sendmail, available in the ports tree #exim : localhost : allow #exim : .nice.guy.example.com : allow #exim : .evil.cracker.example.com : deny exim : ALL : deny # Portmapper is used for all RPC services; protect your NFS! # (IP addresses rather than hostnames *MUST* be used here) #portmap : 192.0.2.32/255.255.255.224 : allow #portmap : 192.0.2.96/255.255.255.224 : allow portmap : ALL : deny # Provide a small amount of protection for ftpd ftpd : localhost : allow ftpd : 192.168.0.5 : allow ftpd : ALL : deny # telnet telnetd : localhost : allow telnetd : 192.168.0.5 : allow telnetd : ALL : deny # httpd (useless in MacOS X as HTTPD is not wrapped) # and not a really good idea to "tcp_wrappe" apache :-) # was here just for experiment purpose on my BSD box. httpd : 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 # The rest of the daemons are protected. ALL : ALL \ : severity auth.info \ : twist /bin/echo "You are not welcome to use %d from %h."