iptables规则备份和恢复、firewalld的9个zone、firewalld关于zone和service操作

PyCharm配置及使用Git教程 平时习惯在Windows下开发,但是我们又需要实时将远方仓库的代码clone到本地,也需要将自己修改的代码push到远端服务器。 阅读详情

保存和备份iptables规则

service iptables save //会把规则保存到/etc/sysconfig/iptables
把iptables规则备份到my.ipt文件中:
iptables-save > my.ipt 恢复刚才备份的规则:
iptables-restore < my.ipt


1.保存规则
[root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  确定  ]

它会保存到配置文件/etc/sysconfig/iptables中

[root@localhost ~]# cat /etc/sysconfig/iptables
# Generated by iptables-save v1.4.21 on Mon Dec  4 02:46:23 2017
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [162:11232]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Mon Dec  4 02:46:23 2017
2.备份规则
[root@localhost ~]# iptables-save >/tmp/myiptables.rule

查看规则

[root@localhost ~]# cat /tmp/myiptables.rule
# Generated by iptables-save v1.4.21 on Mon Dec  4 02:49:42 2017
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [261:20920]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Mon Dec  4 02:49:42 2017
3.恢复规则
[root@localhost ~]# iptables-restore </tmp/myiptables.rule

恢复规则一般使用备份规则中,注意:服务器或者重启iptables,它会自动加载配置文件中的规则


firewalld的9个zone

• 打开firewalld
• systemctl disable iptables
• systemctl stop iptables
• systemctl enable firewalld
• systemctl start firewalld
• firewalld默认有9个zone
• 默认zone为public
• firewall-cmd --get-zones //查看所有zone
• firewall-cmd --get-default-zone//查看默认zone


  1. 关闭开机自动启动netfilter
[root@localhost ~]# systemctl disable iptables
Removed symlink /etc/systemd/system/basic.target.wants/iptables.service.
  1. 关闭netfilter
[root@localhost ~]# systemctl stop iptables
  1. 设置开机启动firewalld
[root@localhost ~]# systemctl enable firewalld
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/basic.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
  1. 启动firewalld
[root@linux-128 ~]# systemctl start firewalld
  1. 查看firewalld的默认规则
[root@localhost ~]# iptables -t nat -nvL
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 PREROUTING_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 PREROUTING_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 PREROUTING_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 OUTPUT_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 POSTROUTING_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 POSTROUTING_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 POSTROUTING_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 POST_public  all  --  *      ens33   0.0.0.0/0            0.0.0.0/0           [goto]
    0     0 POST_public  all  --  *      +       0.0.0.0/0            0.0.0.0/0           [goto]

Chain POSTROUTING_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain POST_public (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 POST_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 POST_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 POST_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain POST_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain POST_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain POST_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain PREROUTING_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 PRE_public  all  --  ens33  *       0.0.0.0/0            0.0.0.0/0           [goto]
    0     0 PRE_public  all  --  +      *       0.0.0.0/0            0.0.0.0/0           [goto]

Chain PREROUTING_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain PREROUTING_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain PRE_public (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 PRE_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 PRE_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 PRE_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain PRE_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain PRE_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain PRE_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination
  1. firewalld有9个zone;zone是firewalld的一个单位,centos7默认是public.

  2. 查看所有的zone

[root@localhost ~]# firewall-cmd --get-zones
work drop internal external trusted home dmz public block  //刚好9个zone
  1. 查看系统默认的zone
[root@localhost ~]# firewall-cmd --get-default-zone
public
  1. 9个zone的介绍 输入图片说明

firewalld关于zone的操作

• firewall-cmd --set-default-zone=work //设定默认zone
• firewall-cmd --get-zone-of-interface=ens33 //查指定网卡
• firewall-cmd --zone=public --add-interface=lo //给指定网卡设置zone
• firewall-cmd --zone=dmz --change-interface=lo //针对网卡更改zone
• firewall-cmd --zone=dmz --remove-interface=lo //针对网卡删除zone
• firewall-cmd --get-active-zones //查看系统所有网卡所在的zone


  1. 修改默认的zone值
[root@localhost ~]# firewall-cmd --get-default-zone   //查看系统默认的zone
public
[root@localhost ~]# firewall-cmd --set-default-zone=work //修改默认的zone值
success
[root@localhost ~]# firewall-cmd --get-default-zone  //查看系统默认的zone
work
  1. 查看指定网卡所在zone
[root@localhost ~]# firewall-cmd --get-zone-of-interface=ens33
work
  1. 给指定的网卡设置zone
[root@localhost ~]# firewall-cmd --zone=home --add-interface=lo     //指定网卡lo为zone
success
[root@localhost ~]# firewall-cmd --get-zone-of-interface=lo   //查看网卡lo的zone
home
  1. 针对网卡更改zone
[root@localhost ~]# firewall-cmd --zone=dmz --change-interface=lo  //将网卡lo的zone修改成dmz
success
[root@localhost ~]# firewall-cmd --get-zone-of-interface=lo  //查看网卡lo的zone
dmz
  1. 针对网卡删除zone
[root@localhost ~]# firewall-cmd --zone=dmz  --remove-interface=lo
success
[root@localhost ~]# firewall-cmd --get-zone-of-interface=lo
no zone
  1. 查看系统所有网卡所在的zone
[root@localhost ~]# firewall-cmd --get-active-zones
work
  interfaces: ens33

firewalld关于service的操作

• firewall-cmd --get-services 查看所有的servies
• firewall-cmd --list-services //查看当前zone下有哪些service
• firewall-cmd --zone=public --add-service=http //把http增加到public zone下面
• firewall-cmd --zone=public --remove-service=http
• ls /usr/lib/firewalld/zones/ //zone的配置文件模板
• firewall-cmd --zone=public --add-service=http --permanent //更改配置文件,之后会在/etc/firewalld/zones目录下面生成配置文件
• 需求:ftp服务自定义端口1121,需要在work zone下面放行ftp
• cp /usr/lib/firewalld/services/ftp.xml /etc/firewalld/services
• vi /etc/firewalld/services/ftp.xml //把21改为1121
• cp /usr/lib/firewalld/zones/work.xml /etc/firewalld/zones/
• vi /etc/firewalld/zones/work.xml //增加一行
• <service name="ftp"/>
• firewall-cmd --reload //重新加载
• firewall-cmd --zone=work --list-services


  1. 查看所有的servies
[root@localhost ~]# firewall-cmd --get-services
RH-Satellite-6 amanda-client amanda-k5-client bacula bacula-client ceph ceph-mon dhcp dhcpv6 dhcpv6-client dns docker-registry dropbox-lansync freeipa-ldap freeipa-ldaps freeipa-replication ftp high-availability http https imap imaps ipp ipp-client ipsec iscsi-target kadmin kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mosh mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3 pop3s postgresql privoxy proxy-dhcp ptp pulseaudio puppetmaster radius rpc-bind rsyncd samba samba-client sane smtp smtps snmp snmptrap squid ssh synergy syslog syslog-tls telnet tftp tftp-client tinc tor-socks transmission-client vdsm vnc-server wbem-https xmpp-bosh xmpp-client xmpp-local xmpp-server
  1. 查看当前zone下有哪些service
[root@localhost ~]# firewall-cmd --get-default-zone   //查看当前系统默认的zone
work
[root@localhost ~]# firewall-cmd --list-services   //查看当前系统默认的zone下有那些service
ssh dhcpv6-client
  1. 查看指定zone下有那些service
[root@localhost ~]# firewall-cmd --zone=public --list-services
dhcpv6-client ssh http
  1. 添加一个service到指定的zone下 [root@linux-128 ~]# firewall-cmd --zone=public --add-service=ftp //将服务ftp添加到public下 success [root@linux-128 ~]# firewall-cmd --zone=public --list-services //查看public下的service dhcpv6-client ssh http ftp

  2. 删除指定zone下的service

[root@localhost ~]# firewall-cmd --zone=public --remove-service=http //删除public下的服务http
success
[root@localhost ~]# firewall-cmd --zone=public --list-services  
dhcpv6-client ssh ftp
  1. zone的配置文件模板 [root@linux-128 ~]# ls /usr/lib/firewalld/zones block.xml dmz.xml drop.xml external.xml home.xml internal.xml public.xml trusted.xml

  2. 更改zone的配置文件

[root@localhost ~]# firewall-cmd --zone=public --add-service=http --permanent
success

[root@localhost ~]# cat /etc/firewalld/zones/public.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
  <short>Public</short>
  <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
  <service name="dhcpv6-client"/>
  <service name="http"/>    //已经添加
  <service name="ssh"/>
</zone>

在添加一个service ftp

[root@localhost ~]# firewall-cmd --zone=public --add-service=ftp --permanent
success
[root@localhost ~]# cat /etc/firewalld/zones/public.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
  <short>Public</short>
  <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
  <service name="ftp"/>   //已经添加
  <service name="dhcpv6-client"/>
  <service name="http"/>
  <service name="ssh"/>
</zone>

案例:需求:ftp服务自定义端口1121,需要在work zone下面放行ftp
拷贝配置文件ftp.xml

[root@localhost ~]# cp /usr/lib/firewalld/services/ftp.xml /etc/firewalld/services
[root@localhost ~]# vi /etc/firewalld/services/ftp.xml

配置文件如下:

<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>FTP</short>
  <description>FTP is a protocol used for remote file transfer. If you plan to make your FTP server publicly available, enable this option. You need the vsftpd package installed for this option to be useful.</description>
  <port protocol="tcp" port="1121"/>
  <module name="nf_conntrack_ftp"/>
</service>

拷贝配置文件work.xml

[root@localhost ~]# cp /usr/lib/firewalld/zones/work.xml /etc/firewalld/zones/
[root@localhost ~]# vi /etc/firewalld/zones/work.xml

配置文件如下:

<?xml version="1.0" encoding="utf-8"?>
<zone>
  <short>Work</short>
  <description>For use in work areas. You mostly trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
  <service name="ssh"/>
  <service name="dhcpv6-client"/>
  <service name="ftp"/>
</zone>

重新加载 firewall-cmd --reload

[root@localhost ~]# firewall-cmd --reload
success

查看work下面的service

[root@localhost ~]# firewall-cmd --zone=work --list-services
ssh dhcpv6-client ftp
别再瞎调了!手把手教你搞定STM32步进电机PID速度环(附完整代码与比例系数详解) 本文详细解析了STM32步进电机PID速度环的完整实现过程,从算法输出到脉冲频率的转换链路,重点讲解了比例系数的确定方法及系统标定实验。通过完整的代码示例和调试技巧,帮助工程师解决实际应用中的常见问题,提升步进电机控制精度与稳定性。 阅读详情

相关推荐

SWAT模型非点源模拟原理

目录引言模型概述非点源污染模拟原理物质迁移内容过程营养物农药病原菌运移河道水质模型营养元素的地表水体循环河道水质模拟藻类模拟氮元素磷元素生化需氧量及溶解氧重金属的运移蓄水体水质模拟 引言 今天无意接触到这一块,就记录下来了。 模型概述 1、流域中非点源污染的来源主要是农业化肥和农药的施用。 2、氮、磷等营养物和农药的迁移和转化取决于化合物在土壤环境中经历的转化过程。 3、SWAT模型可以模拟水文相应单元内氮、磷完整的营养物循环过程和任何一种农药的降解过程。 4、SWAT模拟流域内泥沙、藻类、溶解氧、有机污染

DoWayChan的博客 4879

firewalld防火墙基础

firewalld防火墙区域配置实现对区域流量的规则放通,丢弃,禁止

weixin_59629968的博客 2113

ESP32接入扣子(Coze) API使用自定义智能体

本示例将使用ESP32开发板通过WiFi接入 **Coze API**,实现一个简单的聊天机器人功能。用户可以通过串口向机器人输入问题,ESP32将通过Coze API与智能体进行通信,并返回对应的回复。本文将详细介绍了如何通过HTTP请求和JSON解析来与API进行交互,并给出完整的代码示例。

宁子希的博客 1万+

linux的firewall配置命令

firewall介绍 所谓“防火墙”是指一种将内部网和公众访问网(如Internet)分开的方法,它实际上是一种建立在现代通信网络技术和信息安全技术基础上的应用性安全技术,隔离技术。越来越多地应用于专用网络与公用网络的互联环境之中。 防火墙主要是借助硬件和软件的作用于内部和外部网络的环境间产生一种保护的屏障,从而实现对计算机不安全网络因素的阻断。只有在防火墙同意情况下,用户才能够进入计算机内,如果不同意就会被阻挡于外。 防火墙是在两个网络通讯时执行的一种访问控制尺度,能最大限度阻止网络中的黑客访问自己的网络

qq_17576885的博客 3873

【ChatGPT实战案例】ChatGPT如何帮助产品经理高效工作?

1. 产品经理主要工作方向, 2. 具体工作中,向ChatGPT提问参考

weixin_62909516的博客 1900

告别代码恐惧!用KRobot图形化编程,10分钟搞定Arduino巡线小车(附完整接线图)

本文介绍如何使用KRobot图形化编程工具快速搭建Arduino巡线小车,无需编写代码。从硬件准备到逻辑构建,详细讲解传感器数据处理、电机控制优化及高级功能扩展,帮助教育工作者和创客爱好者10分钟内完成项目。

weixin_30632089的博客 395

CentOS 7 firewalld 配置相关教程

一、CentOS 7的防火墙 1.1、firewalld 在CentOS 7默认是使用firewalld为防火墙。不过CentOS 7里有几种防火墙共存:firewalld、iptables、ebtables。虽然CentOS 7默认是使用firewalld来管理netfilter子系统,不过底层调用的命令仍然是iptables等。firewalld跟iptables比起来,不好的地方是每个服务都需要去设置才能放行,因为默认是拒绝。而iptables里默认是每个服务是允许,需要拒绝的才去限制。 1

IT- 研究者 1581

手把手教你用Python分析OpenFAST仿真结果:pyDatView处理.out文件与数据可视化技巧

本文详细介绍了如何使用Python中的pyDatView工具分析OpenFAST仿真结果,包括数据加载、质量检查、时域与频域分析、多工况对比及自动化报告生成。通过优化技巧和可视化方法,帮助工程师高效处理.out文件,提升风机性能分析的准确性和效率。

weixin_29311017的博客 183

linux下的火墙管理 (firewalld篇)

文章目录firewalld的开启关于firewalld的域关于firewalld的设定原理及数据存储 firewalld是在rhel7之后新加的对火墙的管理方式。 与iptables不同的是,firewalled里的大部分东西模块化集成。更偏向于“傻瓜化”,趋近于window的火墙管理方式。 firewalld的开启 将iptables的管理方式切换到firewalld的管理方式: 方法同fare...

qq_42564122的博客 1067

数码管动态扫描避坑指南:如何用188芯片实现50Hz无闪烁显示?

本文深入解析188数码管动态扫描技术,提供工业级无闪烁显示方案。通过优化轮询扫描机制、硬件电路设计和软件架构,实现50Hz高刷新率显示,解决亮度不均和鬼影问题,适用于医疗设备和工业控制面板等高要求场景。

hhh00的博客 975

OpenClaw人人养虾:接入即时通讯平台Zalo

通过 Zalo Official Account(OA,官方账号)API,可以将 OpenClaw 接入 Zalo,实现面向越南用户的自动化客服和互动。

王国平的博客 437

Centos7 配置防火墙 firewall

从CentOS7开始,默认使用firewall来配置防火墙,没有安装iptables(旧版默认安装)

javry的专栏 3008

FPGA入门200例(17):如何阅读RTL原理图(Schematic)?将Verilog代码与门级电路对应

本文针对FPGA开发新手常见误区,重点讲解了RTL原理图的重要性和阅读方法。文章指出,仅通过仿真验证代码会导致板级测试异常,而RTL原理图能直观呈现Verilog代码对应的硬件结构(门电路、寄存器、多路选择器等)。通过"识别基础元件→跟踪信号路径→验证逻辑关系"的三步法,新手可以建立代码与硬件的映射思维,排查冗余逻辑、意外锁存器等错误。文章还结合Vivado/Quartus工具操作指南和典型代码案例,帮助读者掌握从代码到硬件实现的转换过程,避免混淆RTL与门级原理图、忽略信号位宽等常见误

远程部署调试 运行安装 项目调试 二次开发 项目技术新 持续迭代 部分源码免费分享 203

iptables规则备份和恢复、firewalld的9个zone、firewalld关于zone的操作、firewalld关于service的操作

iptables规则备份和恢复保存和备份iptables规则service iptables save //会把规则保存到/etc/sysconfig/iptablesservice iptables save想要备份到指定文件中可以使用如下命令:(把iptables规则备份到/tmp/ipt.txt文件中)iptables-save &amp;gt; /tmp/ipt.txt我们cat一下看一下...

qq_39225153的博客 270

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

iptables规则备份和恢复 firewalld的9个zone firewalld关于zone的操作 firewalld关于service的操作...

iptables规则备份和恢复 保存和备份iptables规则Service iptables save //会把规则保存到/etc/sysconfig/iptables把iptables规则备份到my.ipt文件中Iptables-save > my.ipt恢复刚才备份的规则iptables-restore < my.ipt firewalld的9个zone 打...

b305723的专栏 196

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

iptables规则备份和恢复 ,firewalld的9个zone , firewalld关于zone的操作, firewalld关于service的操作

iptables规则的备份和恢复保存和备份iptables规则service iptables save //会把规则保存到/etc/sysconfig/iptables把iptables规则备份到my.ipt文件中iptables-save &gt; my.ipt恢复刚才备份的规则iptables-restore &lt; my.ipt将iptables规则保存到其他文件中service ipt...

weixin_39663255的博客 414

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

iptables规则备份和恢复 firewalld的9个zone 关于zone、关于service的操作

1,iptables规则备份和恢复。    前面设定的防火墙规则只保存在内存中,并没有保存到某一个文件中。当系统启动后以前设定的规则就没有了,所以设定好规则后先保存一下。命令如下:        它会提示你防火墙规则保存在/etc/sysconfig/iptables文件内,这个文件就是iptables的配置文件。遇到备份防火墙规则的任务,我们只要复制一份这个文件的副本即可。    清除防火墙的规...

wanli245的博客 555

10.19 iptables规则备份和恢复 ,firewalld的9个zone,service的操作

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33856370的博客 124

七周第五次课 2017.12.1 iptables规则备份和恢复、firewalld的9个zone、firewalld关于zone的操作、firewalld关于service的操作

10.19 iptables规则备份和恢复 service iptables save会把规则保存到/etc/sysconfig/iptables 想要备份到指定文件中可以使用如下命令: iptables-seve > 文件名 想要恢复指定文件里的规则使用如下命令: iptables-restore 使用service iptables save保存在/etc/sysconfig/i

wtyufdssyh的博客 254

iptables规则备份和恢复、firewalld的9个zone和zone、service的操作

10.19 iptables规则备份和恢复 10.20 firewalld的9个zone firewall防火墙用于centos7以后 下面是关于firewall防火墙的设置讲解。 先关闭netfilter如下: 打开firewalld firewalld怎么用:它默认有9个zone。zone是firewalld的一个单位。默认是使用public zone.每个z...

weixin_34150830的博客 150

linux学习第三十一篇:iptables规则备份和恢复,firewalld的9个zone,firewalld关于zone的操作,firewalld关于service的操作

iptables nat表应用nat表应用 A机器两块网卡ens37(192.168.202.129)、ens33(192.168.100.1),ens37可以上外网,ens33仅仅是内部网络,B机器只有ens33(192.168.100.100),和A机器ens33可以通信互联。 需求1:可以让B机器连接外网 给两台虚拟机添加一块新的网卡 A和B给新的网卡设置为LAN区段 添加自定义名字

X__linux的博客 477

iptables规则备份和恢复、firewalld的9个zone以及操作和service的操作

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33893473的博客 242

iptables规则备份和恢复 firewalld的9个zone firewalld关于zone的操作 firewalld关于service的操作...

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34365417的博客 124
上一篇: iptables filter表案例
Young_Linux
博客等级 码龄10年 6粉丝 29原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值