V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
aruisi
V2EX  ›  Linux

iptables 如何只让国内用户连接?

  •  
  •   aruisi · 2015-02-02 22:11:28 +08:00 · 3565 次点击
    这是一个创建于 3375 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这个是不是要准备个ip库去查询还是怎么弄?
    或者有无更好的防火墙?
    5 条回复    2015-02-03 15:42:29 +08:00
    petercai
        1
    petercai  
       2015-02-02 22:13:30 +08:00 via Android   ❤️ 1
    ipset
    lshero
        2
    lshero  
       2015-02-02 22:55:22 +08:00   ❤️ 1
    nginx + geoip会弄
    iptables 的话参考一下这个看行不行 http://www.ttlsa.com/web/iptables-geoip-filtration-barrier-source-ip/
    alsotang
        3
    alsotang  
       2015-02-02 22:57:32 +08:00   ❤️ 1
    ryd994
        4
    ryd994  
       2015-02-03 03:01:57 +08:00   ❤️ 1
    也就能靠geoip了,ipset多了的话消耗有点大
    leif
        5
    leif  
       2015-02-03 15:42:29 +08:00
    https://www.countryipblocks.net/country_selection.php
    生成国内的ip列表
    iptables 允许国内IP INPUT 默认为DROP
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   819 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:37 · PVG 05:37 · LAX 14:37 · JFK 17:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.