Home > IT Architecture, Linux, Systems, Unix > TCP wrappers /etc/hosts.allow /etc/hosts.deny

TCP wrappers /etc/hosts.allow /etc/hosts.deny

June 2nd, 2016

A simple example on linux box:

[root@test ~]# cat /etc/hosts.allow
sshd : ALL EXCEPT host1.example.com
snmpd : ALL EXCEPT host1.example.com
ALL : localhost

[root@test ~]# cat /etc/hosts.deny
ALL:ALL

And here's explaining:

Service "sshd/snmpd" will accept connections from all hosts except host1.example.com. All services will accept connections from localhost. Other services will deny connections from all hosts.

 

Good Luck!


Categories: IT Architecture, Linux, Systems, Unix Tags:
Comments are closed.