Views 11335 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

iptables 를 사용하기 위한 기본 모듈 올리기


insmod ip_tables

insmod iptable_filter

insmod ip_conntrack

insmod ipt_state

insmod ipt_limit


iptables 옵션

-A : 새로운 규칙을 추가한다.(--append) 

-D : 규칙을 삭제한다.(--delete)

-C : 패킷을 테스트한다.(--check)

-R : 새로운 규칙으로 교체한다.(--replace) 

-I : 새로운 규칙을 삽입한다.(--insert) 

-L : chain에 설정된 규칙을 출력한다.(--list) 

-F : chain으로부터 규칙을 모두 방출(삭제)한다.(--flush) 

-Z : 모든 chain의 패킷과 바이트 카운터 값을 0으로 만든다.(--zero) 

-N : 새로운 chain을 만든다.(--new) 

-X : chain을 삭제한다.(--delete-chain) 

-P : 기본정책을 변경한다.(--policy) 


chain 


INPUT : 입력에 대한 사용 

OUTPUT : 출력에 대한 사용 

FORWARD : 전달(forwarding)에 대한 사용 


Options 


-s : 패킷의 발신지를 명시한다.(--source) 

-p : 패킷의 프로토콜을 명시한다.(--protocol) 

-d : 패킷의 도착지를 명시한다.(--destination) 

-i : 규칙을 적용할 인터페이스 이름을 명시한다.(--interface) 

-j : 규칙에 맛는 패킷을 어떻게 처리할 것인가를 명시한다.(-jump) 

-y : 접속 요청 패킷인 SYN패킷을 허용하지 않는다.(--syn) 

-f : 두 번째 이후의 조각에 대해서 규칙을 명시한다.(--fragment)


input로 들어오는 127.0.0.1 중 그게 icmp 이면 drop 시킴

iptables -A INPUT -s 127.0.0.1 -p icmp -j DROP


삭제방법 2가지

iptables -D INPUT 1 //첫번째것을 삭제

iptables -D INPUT -s 127.0.0.1 -p icmp -j DROP //조건에 맞는것 삭제



?

List of Articles
No. Category Subject Author Date Views
26 System/OS [linux] iptables 초간단 세팅 스크립트 hooni 2017.09.26 1237
25 System/OS 무료로 HTTPS 적용하기 (Let's Encrypt) file hooni 2017.10.28 1401
24 System/OS OpenSSL로 ROOT CA 생성 및 SSL 인증서 발급하기 hooni 2017.10.28 1455
23 System/OS [mac] How to uninstall MySQL on Mac OS. hooni 2017.11.08 884
22 System/OS [linux] 초간단 Postfix, Covecot, SSL/TLS (SMTP) file hooni 2017.12.11 9323
21 System/OS [linux] 초간단 SquirrelMail 설치/설정 (다람쥐 메일) hooni 2017.12.11 4457
20 System/OS 콘솔에서 패스워드 걸린 zip 압축하는 명령 hooni 2018.03.02 937
19 System/OS [mac] 맥에서 기본 실행 앱 변경하기 file hooni 2018.03.02 1804
18 System/OS How to Setup an Email Server on CentOS 7 hooni 2018.04.05 2779
17 System/OS 서버 확장을 위한 두 가지 방법 file hooni 2018.08.29 2098
16 System/OS Mac에서 Node.js 설치하기 file hooni 2018.09.28 4187
15 System/OS [virtualbox] VirtualBox에 Ubuntu 설치하기 file hooni 2019.11.22 908
14 System/OS SSH Passwordless Login Using SSH Keygen in 5 Easy Steps file hooni 2019.11.22 1388
13 System/OS RPA란? 어디에 어떻게 쓰이고 누가 만드나? file hooni 2020.01.28 1355
12 System/OS Configure Postfix to Use Gmail SMTP on Ubuntu 18.04 file hooni 2020.02.07 1248
11 System/OS [linux] The Ultimate Wget Download Guide With 15 Awesome Examples hooni 2020.05.26 799
Board Pagination Prev 1 ... 9 10 11 12 13 Next
/ 13