본문 바로가기

프로그래밍/Windows

hosts 파일

[ hosts 파일 ]

 

- DNS 서버를 사용하기 전 window,리눅스등 에서 사용하던 파일. 서버 주소가 있는 텍스트 파일.

- 개인 DNS 서버

 

 

1. hosts 파일 위치

 

Windows98 : c:\windows\hosts
WindowNT/2000 : c:\winnt\system32\drivers\etc\hosts
Windows XP : c:\windows\system32\drivers\etc\hosts

Vista : c:\windows\system32\drivers\etc\hosts

WIndows 7 : c:\windows\system32\drivers\etc\hosts

 

2. 기능

 

1) 특정 도메인 접근 제한

2) 개인 IP 등록 용도 사용

 

 

3. 특정 도메인 접근 제한 방법

 

hosts 파일안에 naver.com 에 대해 접근 차단하려면

127.0.0.1    naver.com

이런식으로 입력하면 차단됨

 

단 수정 후 재부팅을 해야 적용가능