hosts.deny 에 EXCEPT 를 사용하는 것과
hosts.allow 에 그냥 써주는 것의 차이점이 있나요?
예를 들면
hosts.deny 에
ALL:ALL EXCEPT xxx.xxx.xxx.xxx
와
hosts.allow 에
ALL:xxx.xxx.xx.xxx
의 차이점이 있을까요?
hosts.deny 에 ALL:ALL EXCEPT 를 쓰면 기본 차단 후 예외를 두는 방식이고, hosts.allow 에 허용 IP 를 쓰면 먼저 허용하는 방식입니다. 두 파일은 허용이 먼저 적용되므로, 허용 목록에 있는 주소는 deny 와 무관하게 통과합니다. 보통은 hosts.deny 에 ALL:ALL을 두고 hosts.allow 에 허용 IP 를 적는 방식이 가장 명확합니다.