"리눅스 iptables"의 두 판 사이의 차이

 
(사용자 3명의 중간 판 25개는 보이지 않습니다)
2번째 줄: 2번째 줄:
==개요==
==개요==
;iptables, ip6tables<ref>IPv6용</ref>
;iptables, ip6tables<ref>IPv6용</ref>
;IP테이블스
*리눅스 OS 방화벽
*리눅스 OS 방화벽
*방화벽, 라우터 역할을 함
*방화벽, 라우터, 브리지 역할을 함
*패킷 필터링, [[네트워크 주소 변환]](NAT)기능 설정
*IP패킷 필터링, [[NAT]] 관리도구
*여러 개의 Netfilter모듈로 구현됨
*여러 개의 [[Netfilter]] 모듈로 구현됨
 
http://i.stack.imgur.com/zF1uo.jpg
 
==기능==
* 상태추척 : iptables 경유 패킷들에 대한 연결상태 추적 기능
* 매칭 : 출발지와 목적지 IP, 출발지와 목적지 PORT, 프로토콜 등을 통한 매칭 기능
* 로그 : 매칭 패킷의 로그 저장
* 포트 포워딩 : NAT 기능 포함
 
==필터 체인 (Filter Chain)==
{| class="wikitable"
|-
! 체인 !! 설명
|-
| INPUT || 외부에서 들어오는 패킷에 대한 체인
|-
| OUTPUT || 내부에서 나가는 패킷에 대한 체인
|-
| FORWARD || 내부에서 경유하는 패킷에 대한 체인
|}
 
==예시==
<syntaxhighlight lang='console'>
[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 
</syntaxhighlight>
<syntaxhighlight lang='console'>
[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
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[고급 보안이 포함된 Windows 방화벽]]
{{z컬럼3|
* [[리눅스 iptables-save]]
* [[리눅스 iptables IP 차단]]
* [[리눅스 iptables 끄기, 켜기]]
* [[netfilter]]
* [[firewalld]]
* [[Firestarter]]
* [[리눅스 ufw]]
* [[고급 보안이 포함된 Windows 방화벽]]
}}


==주석==
==주석==
<references/>
<references/>


==참고 자료==
==참고==
*http://en.wikipedia.org/wiki/Iptables
*http://en.wikipedia.org/wiki/Iptables
*https://www.netfilter.org/downloads.html


[[분류: iptables]]
[[분류: 리눅스]]
[[분류: 리눅스]]
[[분류: 방화벽]]
[[분류: 방화벽]]

2023년 12월 28일 (목) 17:50 기준 최신판

1 개요[ | ]

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

 

2 기능[ | ]

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

3 필터 체인 (Filter Chain)[ | ]

체인 설명
INPUT 외부에서 들어오는 패킷에 대한 체인
OUTPUT 내부에서 나가는 패킷에 대한 체인
FORWARD 내부에서 경유하는 패킷에 대한 체인

4 예시[ | ]

[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

5 같이 보기[ | ]

6 주석[ | ]

  1. IPv6용

7 참고[ | ]

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