리눅스 iptables

John Jeong (토론 | 기여)님의 2018년 11월 23일 (금) 12:31 판 (→‎개요)

1 개요

iptables, ip6tables[1]
IP테이블스
  • 리눅스 OS 방화벽
  • 방화벽, 라우터, 브리지 역할을 함
  • IP패킷 필터링, NAT 관리도구
  • 여러 개의 Netfilter 모듈로 구현됨

 

2 기능

  • 상태추척 : iptables 경유 패킷들에 대한 연결상태 추적 기능
  • 매칭 : 출발지와 목적지 IP, 출발지와 목적지 PORT, 프로토콜 등을 통한 매칭 기능
  • 로그 : 매칭 패킷의 로그 저장
  • 포트 포워딩 : NAT 기능 포함

3 예시

[root@zetawiki ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh 
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[root@zetawiki ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

4 같이 보기

5 주석

  1. IPv6용

6 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}