Notice
Recent Posts
Recent Comments
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
more
Archives
Today
Total
관리 메뉴

웹프로그래밍

iptables와 netfilter를 Linux Kernel에 추가하기 본문

리눅스Linux

iptables와 netfilter를 Linux Kernel에 추가하기

공부모드 2016. 7. 13. 04:49

iptables를 커널의 일부로 빌드하면 사용할 때 에러가 발생하고, 궂이 모듈로 빌드해야 한다. ip_tables.ko만 인서트 하면 아래 에러가 발생한다.

getsockopt for multiport failed strangely: No such file or directory
getsockopt for multiport failed strangely: No such file or directory

그래서 iptable_filter.ko, xt_multiport.ko를 추가로 인서트 해야 한다.

 

 

1. Linux Kernel의 menuconfig에서 netfilter하위 메뉴의 iptables관련 옵션을 추가한후 커널 빌드. 

-> iptables명령을 실행하면 iptables관련 모듈을 insert해야 한다는 오류 발생.

 

2. 1번의  설정을 모듈로 변경한 후 커널 빌드.

  이 때, make zImage로 빌드하면 zImage만 생성되고 모듈은 생성되지 않음.

  그냥 make라고 빌드해야 *.ko가 생성됨.

 

3. ip_tables.ko, iptable_filter.ko, xt_multiport.ko 모듈을 insmod로 인서트 하면 iptables명령어 사용 가능.

Comments