~/script/xtables-addons-2.0]# make -j 8
make all-recursive
make[1]: Entering directory `/root/script/xtables-addons-2.0'
Making all in extensions
make[2]: Entering directory `/root/script/xtables-addons-2.0/extensions'
make -f ../Makefile.iptrules all;
Xtables-addons 2.0 - Linux make[3]: Entering directory `/root/script/xtables-addons-2.0/extensions'
CC libxt_geoip.oo
CCLD libxt_geoip.so
make[3]: Leaving directory `/root/script/xtables-addons-2.0/extensions'
2.6.32-642.6.2.el6.x86_64
if [ -n "/lib/modules/2.6.32-642.6.2.el6.x86_64/build" ]; then make -C /lib/modules/2.6.32-642.6.2.el6.x86_64/build M=/root/script/xtables-addons-2.0/extensions modules; fi;
make[3]: Entering directory `/usr/src/kernels/2.6.32-642.6.2.el6.x86_64'
CC [M] /root/script/xtables-addons-2.0/extensions/compat_xtables.o
CC [M] /root/script/xtables-addons-2.0/extensions/xt_geoip.o
In file included from /root/script/xtables-addons-2.0/extensions/compat_xtables.h:7,
from /root/script/xtables-addons-2.0/extensions/xt_geoip.c:25:
/root/script/xtables-addons-2.0/extensions/compat_xtnu.h:21: warning: 'struct xt_action_param' declared inside parameter list
/root/script/xtables-addons-2.0/extensions/compat_xtnu.h:21: warning: its scope is only this definition or declaration, which is probably not what you want
/root/script/xtables-addons-2.0/extensions/compat_xtnu.h:36: warning: 'struct xt_action_param' declared inside parameter list
In file included from /root/script/xtables-addons-2.0/extensions/xt_geoip.c:25:
/root/script/xtables-addons-2.0/extensions/compat_xtables.h:12:3: warning: #warning Kernels below 3.7 not supported.
In file included from /root/script/xtables-addons-2.0/extensions/compat_xtables.c:26:
/root/script/xtables-addons-2.0/extensions/compat_xtnu.h:21: warning: 'struct xt_action_param' declared inside parameter list
/root/script/xtables-addons-2.0/extensions/compat_xtnu.h:21: warning: its scope is only this definition or declaration, which is probably not what you want
/root/script/xtables-addons-2.0/extensions/compat_xtnu.h:36: warning: 'struct xt_action_param' declared inside parameter list
/root/script/xtables-addons-2.0/extensions/compat_xtables.c:32: warning: 'struct xt_action_param' declared inside parameter list
/root/script/xtables-addons-2.0/extensions/compat_xtables.c: In function 'xtnu_target_run':
/root/script/xtables-addons-2.0/extensions/compat_xtables.c:34: error: dereferencing pointer to incomplete type
/root/script/xtables-addons-2.0/extensions/compat_xtables.c:36: warning: passing argument 2 of 'nt->target' from incompatible pointer type
/root/script/xtables-addons-2.0/extensions/compat_xtables.c:36: note: expected 'const struct xt_action_param *' but argument is of type 'const struct xt_action_param *'
/root/script/xtables-addons-2.0/extensions/compat_xtables.c: In function 'xtnu_register_target':
/root/script/xtables-addons-2.0/extensions/compat_xtables.c:60: warning: assignment from incompatible pointer type
/root/script/xtables-addons-2.0/extensions/compat_xtables.c:61: warning: assignment from incompatible pointer type
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:190: warning: 'struct xt_action_param' declared inside parameter list
/root/script/xtables-addons-2.0/extensions/xt_geoip.c: In function 'xt_geoip_mt6':
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:192: error: dereferencing pointer to incomplete type
/root/script/xtables-addons-2.0/extensions/xt_geoip.c: At top level:
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:244: warning: 'struct xt_action_param' declared inside parameter list
/root/script/xtables-addons-2.0/extensions/xt_geoip.c: In function 'xt_geoip_mt4':
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:246: error: dereferencing pointer to incomplete type
/root/script/xtables-addons-2.0/extensions/xt_geoip.c: At top level:
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:330: warning: initialization from incompatible pointer type
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:331: warning: initialization from incompatible pointer type
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:340: warning: initialization from incompatible pointer type
/root/script/xtables-addons-2.0/extensions/xt_geoip.c:341: warning: initialization from incompatible pointer type
make[4]: *** [/root/script/xtables-addons-2.0/extensions/compat_xtables.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [/root/script/xtables-addons-2.0/extensions/xt_geoip.o] Error 1
make[3]: *** [_module_/root/script/xtables-addons-2.0/extensions] Error 2
make[3]: Leaving directory `/usr/src/kernels/2.6.32-642.6.2.el6.x86_64'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/root/script/xtables-addons-2.0/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/script/xtables-addons-2.0'
make: *** [all] Error 2
cent 6버전에 xtables2점대 설치시 버전 안맞아서 이런 저런 에러 나는듯....
iptables에 geoip 설정만 되면 되니까 걍 xtables1.4.7 버전 설치해도 상관없음
ps.
xtables 설치시 mconfig에 geoip 빼고 다 주석해도 상관없음
어차피 iptables geoip만 적용되면 되니까 딴건 필요없음
~/script/xtables-addons-1.47.1]# make -j 8
make all-recursive
make[1]: Entering directory `/root/script/xtables-addons-1.47.1'
Making all in extensions
make[2]: Entering directory `/root/script/xtables-addons-1.47.1/extensions'
make -f ../Makefile.iptrules all;
Xtables-addons 1.47.1 - Linux make[3]: Entering directory `/root/script/xtables-addons-1.47.1/extensions'
CC libxt_geoip.oo
CCLD libxt_geoip.so
make[3]: Leaving directory `/root/script/xtables-addons-1.47.1/extensions'
2.6.32-642.6.2.el6.x86_64
if [ -n "/lib/modules/2.6.32-642.6.2.el6.x86_64/build" ]; then make -C /lib/modules/2.6.32-642.6.2.el6.x86_64/build M=/root/script/xtables-addons-1.47.1/extensions modules; fi;
make[3]: Entering directory `/usr/src/kernels/2.6.32-642.6.2.el6.x86_64'
CC [M] /root/script/xtables-addons-1.47.1/extensions/compat_xtables.o
CC [M] /root/script/xtables-addons-1.47.1/extensions/xt_geoip.o
/root/script/xtables-addons-1.47.1/extensions/compat_xtables.c: In function 'xtnu_ipv6_find_hdr':
/root/script/xtables-addons-1.47.1/extensions/compat_xtables.c:633: error: too few arguments to function 'ipv6_find_hdr'
make[4]: *** [/root/script/xtables-addons-1.47.1/extensions/compat_xtables.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [_module_/root/script/xtables-addons-1.47.1/extensions] Error 2
make[3]: Leaving directory `/usr/src/kernels/2.6.32-642.6.2.el6.x86_64'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/root/script/xtables-addons-1.47.1/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/script/xtables-addons-1.47.1'
make: *** [all] Error 2
위에 에러는 커널 뭐 어쩌구 안맞아서 설치가 안된단다.
vim /lib/modules/2.6.32-642.6.2.el6.x86_64/build/include/linux/autoconf.h
열어서
1574 /*#define CONFIG_IP6_NF_IPTABLES_MODULE 1*/
위에 처럼 주석한다. /* 내용 */ 하면 안에있는것들 주석됨