Помогите установить Geoip

12
D
На сайте с 28.06.2008
Offline
1114
2439

Ставил раньше на один из своих серверов по этой инструкции - все было ок, а сейчас выдает вот что

root@ns334:~# module-assistant auto-install xtables-addons-source
-bash: module-assistant: command not found
[Удален]
#1

aptitude install module-assistant

В статье есть. Он у вас не установлен судя по всему.

D
На сайте с 28.06.2008
Offline
1114
#2

Словил еще одну ошибку

root@ns3321634:~# apt-get install xtables-addons-common xtables-addons-source module-assistant libtext-csv-xs-perl Reading package lists... Done
Building dependency tree
Reading state information... Done
libtext-csv-xs-perl is already the newest version.
module-assistant is already the newest version.
The following extra packages will be installed:
autopoint build-essential cpp-4.6 debhelper dkms dpkg-dev fakeroot firmware-linux-free gcc-4.6 gcc-4.6-base gettext git git-man html2text intltool-debian iptables-dev
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libcroco3 libcurl3-gnutls libdpkg-perl liberror-perl libfile-fcntllock-perl libgettextpo0
libmail-sendmail-perl libsys-hostname-long-perl libunistring0 libuuid-perl linux-base linux-headers-3.2.0-4-amd64 linux-headers-3.2.0-4-common linux-headers-amd64
linux-image-3.2.0-4-rt-amd64 linux-kbuild-3.2 menu patch pkg-config po-debconf xtables-addons-dkms
Suggested packages:
gcc-4.6-locales dh-make debian-keyring gcc-4.6-multilib libmudflap0-4.6-dev gcc-4.6-doc libgcc1-dbg libgomp1-dbg libquadmath0-dbg libmudflap0-dbg binutils-gold gettext-doc
git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-gui gitk gitweb linux-doc-3.2 debian-kernel-handbook menu-l10n gksu kdebase-bin
kdebase-runtime ktsuss sux ed diffutils-doc libmail-box-perl
Recommended packages:
linux-image linux-headers-generic linux-headers
The following NEW packages will be installed:
autopoint build-essential cpp-4.6 debhelper dkms dpkg-dev fakeroot firmware-linux-free gcc-4.6 gcc-4.6-base gettext git git-man html2text intltool-debian iptables-dev
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libcroco3 libcurl3-gnutls libdpkg-perl liberror-perl libfile-fcntllock-perl libgettextpo0
libmail-sendmail-perl libsys-hostname-long-perl libunistring0 libuuid-perl linux-base linux-headers-3.2.0-4-amd64 linux-headers-3.2.0-4-common linux-headers-amd64
linux-image-3.2.0-4-rt-amd64 linux-kbuild-3.2 menu patch pkg-config po-debconf xtables-addons-common xtables-addons-dkms xtables-addons-source
0 upgraded, 42 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.2 MB/56.7 MB of archives.
After this operation, 201 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://security.debian.org/ wheezy/updates/main linux-image-3.2.0-4-rt-amd64 amd64 3.2.57-3+deb7u2
404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org/ wheezy/updates/main linux-headers-3.2.0-4-common amd64 3.2.57-3+deb7u2
404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org/ wheezy/updates/main linux-headers-3.2.0-4-amd64 amd64 3.2.57-3+deb7u2
404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org/ wheezy/updates/main libcurl3-gnutls amd64 7.26.0-1+wheezy9
404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Failed to fetch http://security.debian.org/pool/updates/main/c/curl/libcurl3-gnutls_7.26.0-1+wheezy9_amd64.deb 404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Failed to fetch http://security.debian.org/pool/updates/main/l/linux/linux-image-3.2.0-4-rt-amd64_3.2.57-3+deb7u2_amd64.deb 404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Failed to fetch http://security.debian.org/pool/updates/main/l/linux/linux-headers-3.2.0-4-common_3.2.57-3+deb7u2_amd64.deb 404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Failed to fetch http://security.debian.org/pool/updates/main/l/linux/linux-headers-3.2.0-4-amd64_3.2.57-3+deb7u2_amd64.deb 404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@ns3321634:~# apt-get install libtext-csv-xs-perl libxml-csv-perl libtext-csv-perl unzip
Reading package lists... Done
Building dependency tree
Reading state information... Done
libtext-csv-perl is already the newest version.
libtext-csv-xs-perl is already the newest version.
libxml-csv-perl is already the newest version.
unzip is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

А дальше

jpg 1010.jpg
[Удален]
#3
Err http://security.debian.org/ wheezy/updates/main linux-image-3.2.0-4-rt-amd64 amd64 3.2.57-3+deb7u2
404 Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]

Сперва:

aptitude update

Это выделенный сервер или виртуальный?

D
На сайте с 28.06.2008
Offline
1114
#4

Выделенный.


root@ns3321634:~# aptitude update
Get: 1 http://security.debian.org wheezy/updates Release.gpg [836 B]
Get: 2 http://security.debian.org wheezy/updates Release [102 kB]
Get: 3 http://debian.mirrors.ovh.net wheezy Release.gpg [1,655 B]
Get: 4 http://debian.mirrors.ovh.net wheezy Release [168 kB]
Get: 5 http://security.debian.org wheezy/updates/main Sources [152 kB]
Get: 6 http://security.debian.org wheezy/updates/main amd64 Packages [238 kB]
Get: 7 http://security.debian.org wheezy/updates/main Translation-en [136 kB]
Get: 8 http://debian.mirrors.ovh.net wheezy/main Sources [5,971 kB]
Get: 9 http://debian.mirrors.ovh.net wheezy/main amd64 Packages [5,841 kB]
Get: 10 http://debian.mirrors.ovh.net wheezy/main Translation-en [3,848 kB]
Fetched 16.5 MB in 4s (3,395 kB/s)

Current status: 90 updates [+90], 84 new [+5].
There is 1 newly obsolete package: libplrpc-perl

Далее стопор на этом шаге:

-bash: ./geoip_download.sh: Permission denied
root@ns3321634:~/xtables-addons-1.28/geoip#
[Удален]
#5

Смотрите права на файл:

ls -l geoip_download.sh

Хотя по умолчанию там все верно. Вероятнее всего вы где-то допустили ошибку. Пересмотрите свои действия.

D
На сайте с 28.06.2008
Offline
1114
#6

Начал все с начала и опять споткнулся на файле

-bash: ./geoip_download.sh: Permission denied
root@ns3321634:~/xtables-addons-1.28/geoip#

Вот права его

-rw-r--r-- 1 root root 278 Jan 24 10:09 geoip_download.sh
root@ns3321634:~/xtables-addons-1.28/geoip#



---------- Добавлено 24.01.2015 в 12:56 ----------

Перенес папку /usr/share/xt_geoip с того сервера где все ок на проблемный

При попытке забанить Китай пишет


root@ns3321634:~/xtables-addons-1.28/geoip# iptables -I INPUT ! -i lo -m geoip --src-cc CN -j DROP
iptables: No chain/target/match by that name.
root@ns3321634:~/xtables-addons-1.28/geoip#
lealhost
На сайте с 07.06.2014
Offline
136
#7

-bash: ./geoip_download.sh: Permission denied

Дайте права на исполнение файлу.

chmod 744 geoip_download.sh

D
На сайте с 28.06.2008
Offline
1114
#8

Спасибо, теперь споткнулся на последнем пункте - собственно бан Китая

root@ns3321634:~/xtables-addons-1.28/geoip# iptables -I INPUT ! -i lo -m geoip --src-cc CN -j DROP
iptables: No chain/target/match by that name.
root@ns3321634:~/xtables-addons-1.28/geoip#
[Удален]
#9

Как вам удалось получить неверные права на файл? :)

---------- Добавлено 24.01.2015 в 12:14 ----------

Покажите

lsmod | grep xt_geoip
D
На сайте с 28.06.2008
Offline
1114
#10

Не знаю... но вроде уже всю инструкцию прошел.. остался последний шаг... но чего-то не хватает :(

---------- Добавлено 24.01.2015 в 13:16 ----------

root@ns3321634:~/xtables-addons-1.28/geoip# lsmod | grep xt_geoip

libkmod: ERROR ../libkmod/libkmod-module.c:1567 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory

Error: could not get list of modules: No such file or directory

12

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий