嗨,我使用OpenSuse Leap 15安装xtables。
如果我只想允许来自德国的22/tcp端口的传入连接。我把这个命令绑起来:
iptables -A INPUT -p tcp --dport 22 -m geoip ! --source-country DE -j DROP
我收到一条错误消息:iptables: No chain/target/match by that name
这个屏幕截图显示了我当前的配置:
📷
在这个论坛中,我看到您还需要一个linux内核模块xt_geoip。如果我运行命令modprobe xt_geoip
我得到了FATAL: Module xt_ge
我正在linux服务器上的屏幕上运行python脚本,当我执行TOP命令时,我可以看到它正在运行,但是已经有几个小时了,脚本没有写任何东西。有人知道原因是什么吗?
这是我的剧本:
import GeoIP
from netaddr import *
gi = GeoIP.GeoIP("/data/GeoIPOrg_20141202.dat", GeoIP.GEOIP_MEMORY_CACHE)
o = Path to the output text file
for line in f:
line = line.strip('\n')
asn
当安装geoip包: npm install geoip时,我得到了以下错误。我也尝试在ubuntu上安装nodejs-legacy包,但仍然有相同的错误。以前有没有人遇到过同样的问题?
gyp: Call to 'node -e "require('nan')"' returned exit status 0. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ER
我有一个程序,它将创建一个具有输出的文本文件,如下所示:
...
AF
Aug 05 16:27:01.310 [notice] Tor 0.3.5.8 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1c, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.8.
Aug 05 16:27:01.310 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torpro
我在我的linux debian机器上安装了geoip模块。它运行apache2 (启用了htaccess )。当我将以下代码添加到htaccess文件时:
GeoIPEnable On
Deny from all
Allow from env=AllowCountry
代码工作正常,我设法阻止从任何IP地址到我的网站的所有传入连接。现在,当我添加一个规则,假设允许来自特定国家的传入连接时,它仍然阻止该连接。这是包含新规则的代码:
GeoIPEnable On
#Put countries to allow here
SetEnvIf GEOIP_COUNTRY_CODE GB AllowCo
嗨,我有几页基本的HTML网站。我想通过根目录中的.htaccess文件阻止来自欧盟国家的访问。我将此代码插入到htaccess文件的顶部,但似乎没有做任何更改。
<ifModule mod_geoip.c>
GeoIPEnable On
# Add countries you wish to deny here
SetEnvIf GEOIP_COUNTRY_CODE AL DenyCountry
SetEnvIf GEOIP_COUNTRY_CODE AD DenyCountry
SetEnvIf GEOIP_COUNTRY_CODE AM DenyCountry
Se
在升级到OS Capitan之后,我正在修复和清理Homebrew。当我测试我的"cellar“下载时,我发现geoip输出如下:
John-iMac:~ John$ geoip
/Users/John/.rvm/gems/ruby-2.1.6/gems/geoip-1.5.0/lib/geoip.rb:235:in `initialize': No such file or directory @ rb_sysopen - /usr/share/GeoIP/GeoIP.dat (Errno::ENOENT)
from /Users/John/.rvm/gems/rub
我有一个rails应用程序部署在弹性豆柄。当我添加创业板hive_geoip2时,它在开发中工作,但是当我部署到eb时,rails应用程序无法用以下错误初始化:
/opt/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `require': libmaxminddb.so.0: cannot open shared object file: No such file or directory - /opt/rubies/ruby-2.1.5/lib/ruby/ge
我试图从输入帖子中发布的数据中处理一个数组ip。要将其转换为经度,我将使用以下代码,
这是我的ci库:
<?php defined('BASEPATH') OR exit('No direct script access allowed');
include APPPATH . 'libraries/GeoIP/src/geoipcity.inc';
class GeoIp{
public function info($ip){
$gi = geoip_open(APPPATH . &