ICMP(Internet Control Message Protocol) : 인터넷 제어 메세지 프로토콜
용도
인터넷/통신상에서 발생한 일반적인 상황 / 오류에 대한 보고
기능
IP 프로토콜을 이용하여 ICMP 메세지 전달
ping : 상대방 호스트의 작동 여부 및 응답시간 측정
- echo request 질의 메세지 요청
- echo reply 응답메세지 요청
trace : 목적지까지의 라우팅 경로 추적
- time exceeded
ICMP 패킷헤더 구조
- ICMP Type
- ICMP Code
- ICMP Checksum
- ICMP Contents
ICMP Type
ICMP Code
ICMP Type 3 : Destination Unreachable (목적지에 도달할 수 없음)
ICMP Type 11 : Time Exceeded (시간 초과)
참고
ICMP Checksum
- 헤더의 손상여부 확인
추가
※ IPTABLES Match
# iptables -p icmp -h
### Don't allow pings through ###
-A INPUT -p icmp -m icmp --icmp-type echo-request -j DROP # icmp-type 8
### Stop smurf attacks ###
-A INPUT -p icmp -m icmp --icmp-type timestamp-request -j DROP # icmp-type 13
-A INPUT -p icmp -m icmp --icmp-type address-mask-request -j DROP # icmp-type 17