V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
evin
V2EX  ›  VPS

如何让 vps 的防火墙静止国外 ip 访问 vps 主机

  •  
  •   evin · Feb 26, 2016 · 1303 views
    This topic created in 3723 days ago, the information mentioned may be changed or developed.
    2 replies    2016-02-26 18:34:26 +08:00
    gai187
        1
    gai187  
       Feb 26, 2016
    你指的访问是那种协议? 如果只是普通的 SSH 登陆,做限制需要你的访问出口有个固定的公网 IP 。

    /etc/hosts.allow
    /etc/hosts.deny

    编辑这两个文件,先 deny_all 然后再 allow 的方式建立白名单
    evin
        2
    evin  
    OP
       Feb 26, 2016
    @gai187 我是指访问 ip 比如说我发现有一个美国的服务器被用来做爬虫 我想用防火墙 屏蔽 美国的 ip 访问我的服务器 ip
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5764 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 06:51 · PVG 14:51 · LAX 23:51 · JFK 02:51
    ♥ Do have faith in what you're doing.