질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

CentOS 6.5(64bit) GeoIP 설정시 문의 드립니다.

작성자 정보

  • 초보입니다 작성
  • 작성일

컨텐츠 정보

본문

https://www.linux.co.kr/home2/board/subbs/board.php?bo_table=lecture&wr_id=1814 강좌를 보면서

GeoIP 설정을 하려는데

iptables v1.4.7: Couldn't load match `geoip':/lib64/xtables/libipt_geoip.so: cannot open shared object file: No such file or directory

와 같은 메시지가 출력이 됩니다. xtables-addons-1.37 로 컴파일 했으며, /lib64/xtables/에서 libipt_geoip.so파일이 생성되지 않습니다.

OS : CentOS release 6.5 (Final)

Kernel : 2.6.32-431.20.3.el6.x86_64

iptables : iptables v1.4.7


아래는 xtables-addon-1.37 컴파일 한 내용입니다.


=====================================================================================================

[root@localhost xtables-addons-1.37]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking linux/netfilter/x_tables.h usability... yes
checking linux/netfilter/x_tables.h presence... yes
checking for linux/netfilter/x_tables.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libxtables... yes
checking for libmnl... yes
checking Xtables module directory... /lib64/xtables
checking kernel version that we will build against... 2.6.32.0 in /lib/modules/2.6.32-431.20.3.el6.x86_64/build
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makefile.iptrules
config.status: creating Makefile.mans
config.status: creating geoip/Makefile
config.status: creating extensions/Makefile
config.status: creating extensions/ACCOUNT/Makefile
config.status: creating extensions/ipset-4/Makefile
config.status: creating extensions/ipset-6/Makefile
config.status: creating extensions/pknock/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
[root@localhost xtables-addons-1.37]# make
make  all-recursive
make[1]: Entering directory `/home/geopia/xtables-addons-1.37'
Making all in extensions
make[2]: Entering directory `/home/geopia/xtables-addons-1.37/extensions'
Xtables-addons 1.37 - Linux 2.6.32-431.20.3.el6.x86_64
if [ -n "/lib/modules/2.6.32-431.20.3.el6.x86_64/build" ]; then make -C /lib/modules/2.6.32-431.20.3.el6.x86_64/build M=/home/geopia/xtables-addons-1.37/extensions modules; fi;
make[3]: Entering directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/compat_xtables.o
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_CHAOS.o
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_DELUDE.o
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_DHCPMAC.o
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_DNETMAP.o
/home/geopia/xtables-addons-1.37/extensions/xt_DNETMAP.c: In function ??dnetmap_tg??:
/home/geopia/xtables-addons-1.37/extensions/xt_DNETMAP.c:313: warning: unused variable ??net??
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_IPMARK.o
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_LOGMARK.o
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.o
/home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.c: In function ??rawnat6_prepare_l4??:
/home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.c:183: error: too few arguments to function ??ipv6_find_hdr??
make[4]: *** [/home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.o] Error 1
make[3]: *** [_module_/home/geopia/xtables-addons-1.37/extensions] Error 2
make[3]: Leaving directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/home/geopia/xtables-addons-1.37/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/geopia/xtables-addons-1.37'
make: *** [all] Error 2
[root@localhost xtables-addons-1.37]# make install
Making install in extensions
make[1]: Entering directory `/home/geopia/xtables-addons-1.37/extensions'
Xtables-addons 1.37 - Linux 2.6.32-431.20.3.el6.x86_64
if [ -n "/lib/modules/2.6.32-431.20.3.el6.x86_64/build" ]; then make -C /lib/modules/2.6.32-431.20.3.el6.x86_64/build M=/home/geopia/xtables-addons-1.37/extensions modules; fi;
make[2]: Entering directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
  CC [M]  /home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.o
/home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.c: In function ??rawnat6_prepare_l4??:
/home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.c:183: error: too few arguments to function ??ipv6_find_hdr??
make[3]: *** [/home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.o] Error 1
make[2]: *** [_module_/home/geopia/xtables-addons-1.37/extensions] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/geopia/xtables-addons-1.37/extensions'
make: *** [install-recursive] Error 1


관련자료

댓글 4

병구83님의 댓글

  • 병구83
  • 작성일
make 때이미 오류가떳네요 오류가 안뜨게 잡으셔야할듯합니다

초보입니다님의 댓글의 댓글

  • 초보입니다
  • 작성일
답변 감사합니다.

미뇽님의 댓글

  • 미뇽
  • 작성일
안녕하세요.
음. 해당 메시지를 보니 ipv6 관련해서 문제가 있는듯 한데요..
그냥 해당 라인 주석 처리 후 다시 make 해 보세요.
/home/geopia/xtables-addons-1.37/extensions/xt_RAWNAT.c    183 라인
그리고 이외에도 몇 개 더 오류가 날텐데.. 수정하셔야 해요.

초보입니다님의 댓글의 댓글

  • 초보입니다
  • 작성일
답변 감사합니다.
해당 부분은 mconfig에서 geoip 모듈만 제외하고 모두 주석처리 한 다음에 컴파일 하니 해결되었습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,034 명
  • 현재 강좌수 :  35,791 개
  • 현재 접속자 :  92 명