zoukankan      html  css  js  c++  java
  • ubuntu ufw

        *

          First, ufw needs to be enabled. From a terminal prompt enter:

          sudo ufw enable

        *

          To open a port (ssh in this example):

          sudo ufw allow 22

        *

          Similarly, to close an opened port:

          sudo ufw deny 22

        *

          To remove a rule, use delete followed by the rule:

          sudo ufw delete deny 22

        *

          It is also possible to allow access from specific hosts or networks to a port. The following example allows ssh access from host 192.168.0.2 to any ip address on this host:

          sudo ufw allow proto tcp from 192.168.0.2 to any port 22

          Replace 192.168.0.2 with 192.168.0.0/24 to allow ssh access from the entire subnet.
        *

          ufw can be disabled by:

          sudo ufw disable

  • 相关阅读:
    读书计划(2020年秋)
    Hbase 常用Shell命令
    假期第三周总结
    语义分析
    虚拟机安装
    掌握需求过程读后感
    第八周总结
    SLR1分析
    第七周总结
    需求工程阅读笔记(三)
  • 原文地址:https://www.cnblogs.com/greencolor/p/2161320.html
Copyright © 2011-2022 走看看