V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
euler13
V2EX  ›  程序员

撸了一个自动添加机器的外网 IP 到 阿里云安全组设置的工具,有人需要吗

  •  
  •   euler13 · Dec 28, 2020 · 2256 views
    This topic created in 1946 days ago, the information mentioned may be changed or developed.

    使用 Python 3 运行, 先 pip install -r requirements.txt

    https://github.com/ihopeit/ecs-security-group-updater

    功能 1.自动删除指定端口、指定优先级(默认为 2)的安全规则中的 IP 2.自动添加当前机器外网 IP (当前网络的外网 IP, 比如办公网络, 或者家里的网络) 到安全组

    4 replies    2020-12-28 17:27:06 +08:00
    Aliencn
        1
    Aliencn  
       Dec 28, 2020
    以前写过类似的,不过是通过描述信息新增和删除,避免多人使用时删错的情况。
    euler13
        2
    euler13  
    OP
       Dec 28, 2020
    看来也有类似的需求 😀 也想通过 Description 来删除, 看了数据结构, 通过 port range 和 优先级来删也可以。
    也有安全规则需要避免误删的, 默认优先级 1 的规则不删除, 脚本删除指定优先级的规则。这样默认就达到了误删除的目的。
    Tink
        3
    Tink  
    PRO
       Dec 28, 2020 via Android
    卧槽需要啊,太关键了
    zunxiongchen
        4
    zunxiongchen  
       Dec 28, 2020
    有用有用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5747 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 06:59 · PVG 14:59 · LAX 23:59 · JFK 02:59
    ♥ Do have faith in what you're doing.