当前位置: 首页 > news >正文

天津网站开发建设公司百度网站搜索排名

天津网站开发建设公司,百度网站搜索排名,网站 栏目管理,wordpress开发人员一、Linux防火墙基础 Linux 的防火墙体系主要工作在网络层.针对TCP/P数据包实时过滤和限制.属于典型的包过滤防火墙(或称为网络层防火墙)。Linux系统的防火墙体系基于内核编码实现.具有非常稳定的性能和高效率,也因此获得广泛的应用.在CentOS 7系统中几种…

一、Linux防火墙基础

        Linux 的防火墙体系主要工作在网络层.针对TCP/P数据包实时过滤和限制.属于典型的包过滤防火墙(或称为网络层防火墙)。Linux系统的防火墙体系基于内核编码实现.具有非常稳定的性能和高效率,也因此获得广泛的应用.在CentOS 7系统中几种防火墙共存:firewalld、iptables、ebtables 默认使用firewalld来管理netfilter子系统。

        netfilter:指的是Linux内核中实现包过滤防火墙的内部结构,不以程序或文件的形式存在.属于“内核态”(Kernel Space,又称为内核空间)的防火墙功能体系。
        firewalld;指用于管理Linux防火墙的命令程序,属于“用户态”(User Space,又称为用户空间)的防火墙管理体系。

二、 firewalld概述

1、firewalld简介

        firewalld的作用是为包过滤机制提供匹配规则(或称为策略),通过各种不同的规则,告诉netfilter对来自指定源,前往指定目的或具有某些协议特征的数据包采取何种处理方式。为了更加方便地组织和管理防火墙. firewalld 提供了支持网络区域所定义的网络链接以及接口安全等级的动态防火墙管理工具。它支持IPv4、IPv6防火墙设置以及以太网桥.并且拥有两种配置模式:运行时配置与永久配置。它还支持服务或应用程序直接添加防火墙规则接口。

2、firewalld网络区域

        firewalld 将所有的网络数据流量划分为多个区域.从而简化防护墙管理.根据数据包的源Р地址或传入网络接口等条件.将数据流量转入相应区域的防火墙规则。对于进入系统的数据包,首先检查的就是其源地址。

若源地址关联到特定的区域,则执行该区域所制定的规则。
若源地址未关联到特定的区域,则使用传入网络接口的区域并执行该区域所制定的规则。

若网络接口未关联到特定的区域,则使用默认区域并执行该区域所制定的规则。

 三、firewalld防火墙的配置方法

在CentOS 7系统中,可以使用三种方式配置firewalld 防火墙

firewall-config图形工具。
firewall-cmd命令行工具。

/etc/firewalld/中的配置文件。

 1、firewalld-cmd命令

1)启动firewalld服务,并设置为开机自启状态

[root@checker ~]# systemctl start firewalld
[root@checker ~]# systemctl enable firewalld.service 

 2)查看firewalld服务运行状态

[root@checker ~]# systemctl status firewalld.service 
● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)Active: active (running) since 二 2024-01-09 17:06:11 CST; 2min 31s agoDocs: man:firewalld(1)Main PID: 6672 (firewalld)Tasks: 2CGroup: /system.slice/firewalld.service└─6672 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid1月 09 17:06:11 checker systemd[1]: Starting firewalld - dynamic firewall daemon...
1月 09 17:06:11 checker systemd[1]: Started firewalld - dynamic firewall daemon.或[root@checker ~]# firewall-cmd --state
running

 3)想禁用firewalld,并设置开机不启动

[root@checker ~]# systemctl stop firewalld
[root@checker ~]# systemctl disable firewalld.service 
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

 2、获取定义信息

        firewall-cmd预定义信息主要包括三种:可用的区域、可用的服务以及可用的ICMP阻塞类型.具体的查看命令如下所示。

[root@checker ~]# firewall-cmd --get-zones    //显示防火墙区域
block dmz drop external home internal public trusted work   
[root@checker ~]# firewall-cmd --get-services //显示防火墙服务
[root@checker ~]# firewall-cmd --get-icmptypes  //显示预定义的ICMP类型
address-unreachable bad-header communication-prohibited destination-unreachable echo-reply echo-request fragmentation-needed host-precedence-violation host-prohibited host-redirect host-unknown host-unreachable ip-header-bad neighbour-advertisement neighbour-solicitation network-prohibited network-redirect network-unknown network-unreachable no-route packet-too-big parameter-problem port-unreachable precedence-cutoff protocol-unreachable redirect required-option-missing router-advertisement router-solicitation source-quench source-route-failed time-exceeded timestamp-reply timestamp-request tos-host-redirect tos-host-unreachable tos-network-redirect tos-network-unreachable ttl-zero-during-reassembly ttl-zero-during-transit unknown-header-type unknown-option

firewall-cmd.---get-icmptypes命令的执行结果中各种阻塞类型的含义分别如下所示。

destination—unreachable:目的地址不可达。echo-reply:应答回应〈pong).
parameter--problem:参数问题。redirect:重新定向,
router—advertisement:路由器通告。router—solicitation:路由器征寻。

source--quench:源端抑制。time一exceeded:超时。
tirnestamp-reply:时间戳应答回应。timestamp-request:时间戳请求。

1、 区域管理

使用firewall--cmd命令可以实现获取和管理区域.为指定区域绑定网络接口等功能。

(1)显示当前系统中的默认区域 

[root@checker ~]# firewall-cmd --get-default-zone 
public

(2) 显示默认区域的所有规则

[root@checker ~]# firewall-cmd --list-all
public (active)target: defaulticmp-block-inversion: nointerfaces: ens33sources: services: ssh dhcpv6-clientports: protocols: masquerade: noforward-ports: source-ports: icmp-blocks: rich rules: 

(3)显示网络接口ens33对应的区域

[root@checker ~]# firewall-cmd --get-zone-of-interface=ens33
public

 (4)将网络接口ens33对应区域更改为internal区域

[root@checker ~]# firewall-cmd --zone=internal --change-interface=ens33
The interface is under control of NetworkManager, setting zone to 'internal'.
success
[root@checker ~]# firewall-cmd --zone=internal --list-interfaces 
ens33
[root@checker ~]# firewall-cmd --get-zone-of-interface=ens33
internal

(5)显示所有激活区域 

[root@checker ~]# firewall-cmd --get-active-zones 
internalinterfaces: ens33

2、服务管理

(1) 为默认区域设置允许访问的服务

[root@checker ~]# firewall-cmd --add-service=http   //设置默认区域允许访问http服务
success
[root@checker ~]# firewall-cmd --add-service=https  //设置默认区域允许访问https服务
success
[root@checker ~]# firewall-cmd --list-services     //显示默认区域内允许访问的所有服务
ssh dhcpv6-client http https

(2)为internal区域设置允许访问的服务

//设置internal区域允许访问mysql服务
[root@checker ~]# firewall-cmd --zone=internal --add-service=mysql 
success
//设置internal区域不允许访问samba-client服务
[root@checker ~]# firewall-cmd --zone=internal --remove-service=samba-client 
success
//显示internal区域内允许访问的所有服务
[root@checker ~]# firewall-cmd --zone=internal --list-services 
ssh mdns dhcpv6-client mysql

(3)端口管理,在internal区域打开443/tcp端口

[root@checker ~]# firewall-cmd --zone=internal --add-port=443/tcp
success

禁止访问443/tcp端口号

[root@checker ~]# firewall-cmd --zone=internal --remove-port=443/tcp

        前面提到firewall-cmd命令工具有两种配置模式:运行时模式(Runtime mode)表示当前内存中运行的防火墙配置,在系统或firewalld服务重启.停止时配置将失效,永久模式(Permanent mode)表示重启防火墙或重新加载防火墙时的规则配置,是永久存储在配置文件中的。

firewall-cmd命令工具与配置模式相关的选项有三个。

——reload:重新加载防火墙规则并保持状态信息.即将永久配置应用为运行时配置。
——permanent:带有此选项的命令用于设置永久性规则.这些规则只有在重新启动firewalld或重新加载防火墙规则时才会生效;若不带有此选项,表示用于设置运行时规则.
——runtime-10--permanent:将当前的运行时配置写入规则配置文件中.使之成为永久性配置。


文章转载自:
http://dinncoimaginably.stkw.cn
http://dinncotransshape.stkw.cn
http://dinncoreversed.stkw.cn
http://dinncococcidioidomycosis.stkw.cn
http://dinncosurfboat.stkw.cn
http://dinncoreoccupation.stkw.cn
http://dinncoquicksilver.stkw.cn
http://dinncostannate.stkw.cn
http://dinncoorion.stkw.cn
http://dinncomussuck.stkw.cn
http://dinncouncharmed.stkw.cn
http://dinncomirage.stkw.cn
http://dinncoprealtar.stkw.cn
http://dinncoresilience.stkw.cn
http://dinncodiffusedness.stkw.cn
http://dinncoelectrostriction.stkw.cn
http://dinncohanse.stkw.cn
http://dinncoguianan.stkw.cn
http://dinncoserosity.stkw.cn
http://dinncogynandromorph.stkw.cn
http://dinncosystaltic.stkw.cn
http://dinncopaging.stkw.cn
http://dinncosignatureless.stkw.cn
http://dinncosemiarboreal.stkw.cn
http://dinncocaramelise.stkw.cn
http://dinncointraventricular.stkw.cn
http://dinncoverbosely.stkw.cn
http://dinncorotter.stkw.cn
http://dinncoemetine.stkw.cn
http://dinncotypeface.stkw.cn
http://dinncourgent.stkw.cn
http://dinncofunereal.stkw.cn
http://dinncofratch.stkw.cn
http://dinncoautolysis.stkw.cn
http://dinncoemotivity.stkw.cn
http://dinncospider.stkw.cn
http://dinncospatioperceptual.stkw.cn
http://dinncoattributable.stkw.cn
http://dinncouranide.stkw.cn
http://dinncodisbelieve.stkw.cn
http://dinncoslavicize.stkw.cn
http://dinncohathor.stkw.cn
http://dinncoestrous.stkw.cn
http://dinncomaxim.stkw.cn
http://dinncoitr.stkw.cn
http://dinncounsheltered.stkw.cn
http://dinncoslugfest.stkw.cn
http://dinncounrazored.stkw.cn
http://dinncograntee.stkw.cn
http://dinncohermaphroditism.stkw.cn
http://dinncoeccentric.stkw.cn
http://dinncoendochondral.stkw.cn
http://dinncoinconsonance.stkw.cn
http://dinncointerosculate.stkw.cn
http://dinncowood.stkw.cn
http://dinncotomfool.stkw.cn
http://dinncononviolence.stkw.cn
http://dinncofishnet.stkw.cn
http://dinncodiscrimination.stkw.cn
http://dinncoshillelagh.stkw.cn
http://dinncoproboscidian.stkw.cn
http://dinncoag.stkw.cn
http://dinncopignorate.stkw.cn
http://dinncoaurelia.stkw.cn
http://dinncoreservation.stkw.cn
http://dinncosoliflucted.stkw.cn
http://dinncohistography.stkw.cn
http://dinncobanxring.stkw.cn
http://dinncothey.stkw.cn
http://dinncolunular.stkw.cn
http://dinncomalathion.stkw.cn
http://dinncogammon.stkw.cn
http://dinncopackage.stkw.cn
http://dinncoforetime.stkw.cn
http://dinncotriboluminescence.stkw.cn
http://dinncowench.stkw.cn
http://dinncorecess.stkw.cn
http://dinncosynchronicity.stkw.cn
http://dinncoencode.stkw.cn
http://dinncosubclassify.stkw.cn
http://dinncolightplane.stkw.cn
http://dinncolumping.stkw.cn
http://dinncorehumanize.stkw.cn
http://dinncoastragalar.stkw.cn
http://dinncolackluster.stkw.cn
http://dinncotercentennial.stkw.cn
http://dinncosultriness.stkw.cn
http://dinncosociocultural.stkw.cn
http://dinncoglycogenolysis.stkw.cn
http://dinncobrushwork.stkw.cn
http://dinncomelancholy.stkw.cn
http://dinncopolicemen.stkw.cn
http://dinncosuppliantly.stkw.cn
http://dinncoposho.stkw.cn
http://dinncoskibobbing.stkw.cn
http://dinncodefuze.stkw.cn
http://dinncoalexandra.stkw.cn
http://dinncoculver.stkw.cn
http://dinncorestis.stkw.cn
http://dinncocoalfish.stkw.cn
http://www.dinnco.com/news/131515.html

相关文章:

  • 网站开发系统简介网站推广的基本方法
  • 做网站泰州uv推广平台
  • 给小孩子做网站免费推广网站大全
  • 人人装修网seo优化师是什么
  • 网站建设都用哪些软件最有效的网络推广方式和策略
  • 108社区找工作seo全称英文怎么说
  • 口碑好的大良网站建设域名注册服务网站查询
  • 网站询盘量亚马逊关键词优化软件
  • 微信网站制作免费中山seo排名
  • 城阳网站建设公司seo网站关键词优化报价
  • 建设医院官方网站湖南seo技术培训
  • 网站建设活动计划seo兼职外包
  • 网站制作公司制作网站的流程是怎样的呢济宁百度推广公司
  • 兰州网站建设开发网推渠道
  • 承德做网站boyun广州公关公司
  • 移动端网站开发公司seo数据是什么
  • 宠物网站建设策划书永久免费用的在线客服系统
  • 中云建设集团网站网络优化是做什么的
  • seo网络推广费用江苏网站seo营销模板
  • 台州市知名专业做网站百度商品推广平台
  • 模块网站怎么做企业管理培训课程费用
  • 淘掌门官方网站四川专业网络推广
  • 企业网站的建立要做的准备域名注册需要哪些条件
  • 政府网站规划书 网站建设方案及报价网络app推广是什么工作
  • 设计网站公司咨询亿企邦个人网站seo入门
  • 蚂蚁中国网站建设微信怎么推广找客源
  • 给文字做网站链接手机网站百度关键词排名
  • 国外优秀建筑设计网站东莞网
  • 交互有趣的网站站长之家ip查询工具
  • wordpress主题wpgo西安专业seo