linux防火墙准入,Linux防火墙操作

66b52468c121889b900d4956032f1009.png

8种机械键盘轴体对比

本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?

防火墙是位于 内部网 和 外部网(一般指公网) 之间的屏障,

它按照系统管理员预先定义好的 规则 来控制数据包的进出。

其作用是防止非法用户的进入。

防火墙的特性:

1、内部网络和外部网络之间的所有网络数据流都必须经过防火墙

2、只有符合安全策略的数据流才能通过防火墙

3、应用层防火墙具备更细致的防护能力

2 UFW – Ubuntu

UFW (Uncomplicated Firewall,简单的防火墙) is a program for managing a netfilter firewall designed to be easy to use.

It uses a command-line interface consisting of a small number of simple commands(由少量简单命令组成的命令行接口), and uses iptables for configuration.

2.1 ufw manul

NAME

ufw - program for managing a netfilter firewall

DESCRIPTION

This program is for managing a Linux firewall and aims to provide an easy to use interface for the user.

2.2 ufw 常用操作

1、

ufw [–dry-run] enable|disable|reload 打开|关闭|重启 防火墙

–dry-run 试运行,显示结果并不执行

2、

ufw [–dry-run] status [verbose|numbered] 查看状态

3、

ufw supports connection rate limiting, which is useful for protecting against brute-force login attacks.

When a limit rule is used, ufw will normally allow the connection but will deny connections if an IP address attempts to initiate 6 or more connections within 30 seconds.

Typical usage is:

ufw limit ssh/tcp

如果同一个IP地址在30秒之内进行了6次及6次以上的连接,ufw将阻止 (deny) 该连接

更多操作参考:1man ufw

3 iptables – redhat

查询防火墙状态:1service iptables status

1

2

3

4

5

6

7

8service iptables stop

#启动防火墙:

service iptables start

#重启防火墙:

service iptables restart

防火墙配置文件 /etc/sysconfig/iptables 。

CentOS 7 防火墙

CentOS 7.0默认使用的是firewall作为防火墙

查看防火墙状态1firewall-cmd --state

停止firewall1systemctl stop firewalld.service

禁止firewall开机启动1systemctl disable firewalld.service

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值