geoip관련질문...
작성자 정보
- 권기완 작성
- 작성일
컨텐츠 정보
- 2,868 조회
- 0 추천
- 목록
본문
현재 페도라코어4를 사용중입니다.
커널버젼은 2.6.17-1.2142_FC4 이구요..(SELinux사용중)
iptables는 rpm 명령으로 설치된걸 보니...iptables-1.3.0-2라고 나오네요..
여기 게시판에 보니 국가별 차단과 관련한 내용이 있어서 따라해보려고 하는데요.
일단 /var/geoip에 복사해 넣으란 파일 두개 /var/geoip디렉토리만들어서 복사해 넣었구요..
iptables는 iptables-1.3.0-2.src.rpm인가 하는 파일을 받아서 풀었더니...
/usr/src/redhat/SOURCE 아래에 iptables-1.3.0 디렉토리가 생겨서..
심볼릭링크로 /usr/src/iptables를 만들었습니다.
p-m-o라는건 patch-o-matic-ng-20060822.tar.tar버젼이 있길래 그걸로 받았습니다.압축을 풀고..(그 이전 버젼도 몇개 해봤습니다..)
patch-o-matic-ng-20060822디렉토리 안에서 아래와 같이 명령을 주었습니다..
#IPTABLES_DIR=/usr/src/iptables KERNEL_DIR=/usr/src/kernels/2.6.17-1.2142_FC4-i686 ./runme geoip
이렇게 하면.. geoip와는 관련이 없어보이는 다른것들이 올라옵니다..
geoip는 없구요..
그래서,(어디서 구했는지는 오래되서 까먹었음,아마도 http://www.maxmind.com 에서 구한것 같음) geoip.tar.tar를 구해서 압축을 풀어서 iptables디렉토리의 patchlets디렉토리 밑으로 복사해 넣었습니다..(패치되는 항목들이 여기에 들어있는것 같아서...)
그리고,다시
#IPTABLES_DIR=/usr/src/iptables KERNEL_DIR=/usr/src/kernels/2.6.17-1.2142_FC4-i686 ./runme geoip
명령을 사용하였더니..아래와 같이 나왔습니다...
Loading patchlet definitions.................... done
Welcome to Patch-o-matic ($Revision: 6577 $)!
Kernel: 2.6.17, /usr/src/kernels/2.6.17-1.2142_FC4-i686
Iptables: 1.3.0, /usr/src/iptables
Each patch is a new feature: many have minimal impact, some do not.
Almost every one has bugs, so don't apply what you don't need!
-------------------------------------------------------
Already applied:
Testing geoip... not applied
The geoip patch:
Author: Samuel Jean <sjean@cookinglinux.org>; Nicolas Bouliane <nib@cookinglinux.org>
Status: Stable
This patch makes possible to match a packet
by its source or destination country.
GeoIP options:
[!] --src-cc, --source-country country[,country,country,...]
Match packet coming from (one of)
the specified country(ies)
[!] --dst-cc, --destination-country country[,country,country,...]
Match packet going to (one of)
the specified country(ies)
NOTE: The country is inputed by its ISO3166 code.
The only extra files you need is a binary db (geoipdb.bin) & its index file (geoipdb.idx).
Take a look at http://people.netfilter.org/peejix/geoip/howto/geoip-HOWTO.html
for a quick HOWTO.
-----------------------------------------------------------------
Do you want to apply this patch [N/y/t/f/a/r/b/w/q/?] y
unable to find ladd slot in src /tmp/pom-15160/net/ipv4/netfilter/Makefile (./patchlets/geoip/linux-2.6/./net/ipv4/netfilter/Makefile.ladd)
-----------------------------------------------------------------
Do you want to apply this patch [N/y/t/f/a/r/b/w/q/?]
위의 메세지가 계속 반복되네요..
왜 이런 문제가 생길까요..ㅜ,.ㅜ
w나 q (무슨뜻인지도 모름),N 를 누르면...빠져 나오면서
Excellent! Source trees are ready for compilation.
메세지가 나옵니다.
커널 업데이트를 할려구 make menuconfig를 하면..(아무리 눈을 씻고 봐도) geoip관련 항목이 안나옵니다.
리눅스 초보라서 더 자세한 정보는 아는게 없어서 못쓰겠네요..
이문제로 거의 한달을 헤메고 있습니다..
(중국쪽 ip로 보이는 것들이 로그항목에서 자주 보여서리..막아 볼려고 합니다...ㅜ,.ㅜ)
혹시 아시는 분 계시면 불쌍한 중생 좀 살려주세요..ㅜ,.ㅜ
(중간에 걸리면 진도를 못나가는 성격이라서..ㅜ,.ㅜ;;)
관련자료
-
이전
-
다음