iptables geoip 패키지 설치
iptables -I chain1 -d 2.2.2.2 -m geoip --src-cc CN -j DROP
iptables v1.4.7: Couldn't load match `geoip':/lib64/xtables/libipt_geoip.so: cannot open shared object file: No such file or directory
=>
wget으로
xtables-addons-2.10.tar
받아와서 configure
configure시
No package 'xtables' found
만약 iptables를 소스 컴파일 하였다면 설치된 경로를 --with-xtables 옵션에 적어주고 compile 패키지 설치 한 경우에는 iptables-devel을 install 해준다.
=> 계속 make에서 comflict 에러... 에러 확인 해보니
#warning Kernels below 3.7 not supported.
위와 같은 comment 가 있었다.
작업하던 리눅스의 커널 버전은 2.6.32**** 였으므로
xtables-addons-1.47.1
로 다시 받아서 compile 후 make
또 에러
too few arguments to function 'ipv6_find_hdr
=>
/usr/src/kernels/`uname -r`/include/linux/autoconf.h
에서
/*#define CONFIG_IP6_NF_IPTABLES_MODULE 1*/
뻐킹..
cd /설치 경로/xtables-addons-1.47.1/geoip
./xt_geoip_dl
./xt_geoip_build *.csv
mkdir -p /usr/share/xt_geoip/
/bin/cp -rf {BE,LE} /usr/share/xt_geoip/
(cp 경로를 /bin/ 까지 써주지 않으면 overwrite 질문에 다 y눌러줘야함...ㅜ)