zoukankan      html  css  js  c++  java
  • How to block a specific IP Address using UFW

    How to block a specific IP Address using UFW

    To                         Action      From
    --                         ------      ----
    22                         ALLOW       Anywhere
    80                         ALLOW       Anywhere
    443                        ALLOW       Anywhere
    22                         ALLOW       Anywhere (v6)
    80                         ALLOW       Anywhere (v6)
    443                        ALLOW       Anywhere (v6)

    Therefore, to block an IP address the rules would need to setup like this:

    To                         Action      From
    --                         ------      ----
    Anywhere                   DENY        <ip address >
    22                         ALLOW       Anywhere
    80                         ALLOW       Anywhere
    443                        ALLOW       Anywhere
    22                         ALLOW       Anywhere (v6)
    80                         ALLOW       Anywhere (v6)
    443                        ALLOW       Anywhere (v6)

    To do this you need to insert the new deny rule at the top using the “insert” option.

    sudo ufw insert 1 deny from <ip address>

    To remove the block simple:

    sudo ufw delete allow from <ip address>

    For more information read the community documentation for UFW on Ubuntu.


     




  • 相关阅读:
    三种常用排序理论
    无参带返回类型方法练习
    无参带返回类型方法总结
    Java_无参数无返回类型方法及练习
    Java_方法的调用②及案例
    方法内存分析(进栈(压栈)、出栈(弹栈))
    Java_方法的基本语法格式
    Java_方法的调用①及案例
    Java_方法的定义以及分类
    Java_break与continue区别
  • 原文地址:https://www.cnblogs.com/jins-note/p/9513302.html
Copyright © 2011-2022 走看看