Hostloc 新帖图文推送
1.81K subscribers
59.5K photos
392K links
本频道基本功能:爬取国内外有名的主机论坛Hostloc新帖,为订阅者提供一手图文资讯!

Hostloc: https://www.hostloc.com

侵删,联系 @CodyD
Download Telegram
标题救救孩子吧
作者财神
原帖https://hostloc.com/thread-820186-1-1.html

摘要:电脑是win10系统,忘了开机密码了  开机一个多月了不敢关机, 怎么在不需要原密码情况下修改密码
标题Nginx根据IP的国家、城市、ASN访问控制
作者1121744186
原帖https://hostloc.com/thread-820187-1-1.html

摘要:1、必要前提环境

NGINX
IP数据库
IP数据库下载地址:https://www.maxmind.com 登录后可以免费下载开源的数据库,效果还是很不错的,改网站也提供商业付费的数据库。

-> GeoLite2-ASN.mmdb
-> GeoLite2-City.mmdb
-> GeoLite2-Country.mmdb

ASN 相当于ip的品牌号码,可用来鉴别各个机房的ip,查询对应IDC机房的ASN可以到该网站:http://bgp.he.net

2、安装 libmaxminddb 用于查询 mmdb 数据库

yum -y install libmaxminddb-devel
3、测试工具

mmdblookup --file GeoLite2-Country.mmdb --ip=测试ip
4、安装 ngx_http_geoip2_module

cd /
git clone https://github.com/leev/ngx_http_geoip2_module
进入NGINX的源码目录下,宝塔的话是 /www/server/nginx/src ,

cd /www/server/nginx/src
nginx -V
nginx version: nginx/1.18.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.1.1g  21 Apr 2020
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/www/server/nginx --add-module=/www/server/nginx/src/ngx_devel_kit --add-module=/www/server/nginx/src/lua_nginx_module --add-module=/www/server/nginx/src/ngx_cache_purge --add-module=/www/server/nginx/src/nginx-sticky-module --with-openssl=/www/server/nginx/src/openssl --with-pcre=pcre-8.43 --with-http_v2_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_stub_status_module --with-http_ssl_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --with-cc-opt=-Wno-error --with-ld-opt=-ljemalloc --with-http_dav_module --add-module=/www/server/nginx/src/nginx-dav-ext-module
复制 configure arguments:后面的全部内容,再最后面加上 --add-dynamic-module=/ngx_http_geoip2_module

./configure --user=www --group=www --prefix=/www/server/nginx --add-module=/www/server/nginx/src/ngx_devel_kit --add-module=/www/server/nginx/src/lua_nginx_module --add-module=/www/server/nginx/src/ngx_cache_purge --add-module=/www/server/nginx/src/nginx-sticky-module --with-openssl=/www/server/nginx/src/openssl --with-pcre=pcre-8.43 --with-http_v2_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_stub_status_module --with-http_ssl_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --with-cc-opt=-Wno-error --with-ld-opt=-ljemalloc --with-http_dav_module --add-module=/www/server/nginx/src/nginx-dav-ext-module --add-dynamic-module=/ngx_http_geoip2_module

make
然后在当前目录的 objs 目录下面得到编译好的 ngx_http_geoip2_module.so

nginx.conf

load_module /modules/ngx_http_geoip2_module.so;

http
{
        geoip2 /www/ipdb/GeoLite2-Country.mmdb {
          auto_reload 60m;
          $geoip2_metadata_country_build metadata build_epoch;
          $geoip2_data_country_code default=CN source=$remote_addr country iso_code;
          $geoip2_data_country_name country names en;
        }

        geoip2 /www/ipdb/GeoLite2-City.mmdb {
          $geoip2_data_city_name default=null city names en;
        }
        geoip2 /www/ipdb/GeoLite2-ASN.mmdb {
          $geoip2_data_asn_code default=0 autonomous_system_number;
          $geoip2_data_asn_name default=null autonomous_system_organization;
        }
    //......省略
}
默认是使用 $remote_addr ,一般反向代理是 X-Forwarded-For ,CF 是 CF-Connecting-IP,需要自定义 使用 source=$remote_addr 设置。

5、测试展示

location /ip
{
  default_type    text/html;
  return 200 '$geoip2_data_country_code $geoip2_data_country_name  $geoip2_data_city_name  $geoip2_data_asn_name $geoip2_data_asn_code';
}

location /
{
    if ($geoip2_data_country_name = "Japan") {
        return 444;
    }
    //....省略
}
最后解释下 $geoip2_data_country_name country names en;

country names en 就是结果的JSON结构,举一反三使用 mmdblookup 工具可以查看数据内容。

{
    country:{
        names:{
            en:"US"
        }
    }

}

格式化不是很好,具体到 我的博客上看吧  https://lmcw.cn/174.html
标题pig家的9929进阶2刀有没有出着玩玩的
作者zhujisou
原帖https://hostloc.com/thread-820188-1-1.html

摘要:好长时间没测评机器了,收台传家鸡鸡写个测评
标题cloudreve现在只有go版了吗?
作者宋喆
原帖https://hostloc.com/thread-820190-1-1.html

摘要:........
./cloudreve
./cloudreve: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./cloudreve)
........
make -j2
make: *** No targets specified and no makefile found.  Stop.
标题有BA号可以直接解析的云服务有哪些
作者MSN
原帖https://hostloc.com/thread-820191-1-1.html

摘要:有BA号可以直接解析的云服务有哪些
标题红包答谢怎么找到真实下载地址
作者TIMI
原帖https://hostloc.com/thread-820193-1-1.html

摘要https://mod.3dmgame.com/mod/30455
比如这个 如何找到真实i下载地址  

https://mod.3dmgame.com/static/upload/resource/201806/9688990_0_20180605104938_98264.zip
上面这个真实地址是 以前没加密以前直接卸载js里面的
标题万一免五 正规券商 打算开车 有人要上车吗
作者wop
原帖https://hostloc.com/thread-820194-1-1.html

摘要:正规券商  基金万一免5  股票万1.5 免5  人多的话打算开一个车
标题这家可以入手吗?
作者昨晚上梦见你了
原帖https://hostloc.com/thread-820195-1-1.html

摘要:不知道宽带是多大的
标题继域名被注册之后。
作者Ther
原帖https://hostloc.com/thread-820196-1-1.html

摘要:继昨天发现域名被注册之后,搞得我的计划支离破碎。

然后

我去搜了一下zhiliposui这个域名,发现1月14号就过期了,阿里应该是64天之后就删除可以注册了,为什么现在还在赎回期?

如果我要注册这个域名现在可以找个网站抢注了吗?
标题新浪WB杯具了...以前很火.现在都没人看了吧?
作者ioioio
原帖https://hostloc.com/thread-820198-1-1.html

摘要:现在还有人玩WB吗.
标题高品质双拼域名出售
作者猛犸
原帖https://hostloc.com/thread-820199-1-1.html

摘要:mangguo.pub  芒果 200
https://mi.aliyun.com/detail/online.html?domainName=mangguo.pub&orgType=0&productType=2

qianbao.pub 钱包 200
https://mi.aliyun.com/detail/online.html?domainName=qianbao.pub&orgType=0&productType=2

shuimu.pub 水母 200
https://mi.aliyun.com/detail/online.html?domainName=shuimu.pub&orgType=0&productType=2

hupo.pub 琥珀   300
https://mi.aliyun.com/detail/online.html?domainName=hupo.pub&orgType=0&productType=2

ruanjian.pub 软件 200
https://mi.aliyun.com/detail/online.html?domainName=ruanjian.pub&orgType=0&productType=2

weige.pub 伟歌 200
https://mi.aliyun.com/detail/online.html?domainName=weige.pub&orgType=0&productType=2

zhanzhang.pub 站长
https://mi.aliyun.com/detail/online.html?domainName=zhanzhang.pub&orgType=0&productType=2

puma.pub 200
https://mi.aliyun.com/detail/online.html?domainName=puma.pub&orgType=0&productType=2

liaoliao.pub 聊聊 200
https://mi.aliyun.com/detail/online.html?domainName=liaoliao.pub&orgType=0&productType=2

nanyang.pub 南阳 200
https://mi.aliyun.com/detail/online.html?domainName=nanyang.pub&orgType=0&productType=2

xinxiang.pub 新乡 200
https://mi.aliyun.com/detail/online.html?domainName=xinxiang.pub&orgType=0&productType=2

suanming.pub 算命 200
https://mi.aliyun.com/detail/online.html?domainName=suanming.pub&orgType=0&productType=2

deepin.pub 200
https://mi.aliyun.com/detail/online.html?domainName=deepin.pub&orgType=0&productType=2
标题某大学的od没有管理员怎么搞?
作者我是坏虫
原帖https://hostloc.com/thread-820200-1-1.html

摘要:能不能夺权过来?域名还是人家大学的,国内的,只是A1
标题家里宽带被停了,好像问有没有监控
作者qxwo
原帖https://hostloc.com/thread-820201-1-1.html

摘要:路由器和hass暴露在公网,难道是这个问题?
标题TMT 忽然掉線
作者GloryBoy
原帖https://hostloc.com/thread-820202-1-1.html

摘要:正用着好好地,忽然间就断线了

还以为VPS出现什么状况,本地SSH赶快连接,结果2台VPS全部连不上了

上网站后台看,都显示的是在线,于是后台重启

重启后依然连接不上...

发个工单,暂时还没回

不知道是什么情况

有没有用TMT的大佬跟我一样的状况?
标题出msdn e3
作者Eamon
原帖https://hostloc.com/thread-820203-1-1.html

摘要:1100 出msdn e3   
qq 11233582
标题斯巴达官方支持WINDOWS,真牛啊
作者C大
原帖https://hostloc.com/thread-820204-1-1.html

摘要:自己不用DD了,也不用怕违规被收回了,放心大胆的用吧

我看1.5G以上的应该都支持WIN,我的1.5G和2G的都可以安装WINDOWS。
标题【帮大佬出】帮大佬出一个pigyun家的9929大带宽机
作者jxpal
原帖https://hostloc.com/thread-820206-1-1.html

摘要:CPU:Intel Xeon E5-V3单核心
内存:2048MB 独享DDR4高频内存
硬盘:40GB SSD (含Raid10保护)
宽带:80Mbps
月流量:350GB
独享IP:1 个IPv4
- 流量包可单独选购
- 高速读写

续费34

10块出了
pm联系方式,我转给大佬