Centos7 禁止firewalld并使用iptables 作默认防火墙
一、停止并禁用firewalld
[root@test ~]# systemctl stop firewalld
[root@test ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
二、查看iptables 列表,并安装service 软件
[root@test ~]# yum list all iptables*
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.neusoft.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.sina.cn
已安装的软件包
iptables.x86_64 1.4.-.el7 @base
可安装的软件包
iptables.i686 1.4.-.el7 base
iptables-devel.i686 1.4.-.el7 base
iptables-devel.x86_64 1.4.-.el7 base
iptables-services.x86_64 1.4.-.el7 base
iptables-utils.x86_64 1.4.-.el7 base
安装service
[root@test ~]# yum install iptablesyum install iptables-services.x86_64 -y
三、启动iptables服务,并检查状态
[root@test ~]# systemctl start iptables
[root@test ~]# systemctl status iptables
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: active (exited) since 五 -- :: CST; 9s ago
Process: ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=/SUCCESS)
Main PID: (code=exited, status=/SUCCESS) 8月 :: test systemd[]: Starting IPv4 firewall with iptables...
8月 :: test iptables.init[]: iptables: Applying firewall rules: [ OK ]
8月 :: test systemd[]: Started IPv4 firewall with iptables.
四、加入开机自启动
[root@test ~]# systemctl enable iptables
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
Centos7 禁止firewalld并使用iptables 作默认防火墙的更多相关文章
- Centos7 禁止firewalld并使用iptables 作默认防火墙以及忘记root密码的处理方法
一.停止并禁用firewalld [root@test ~]# systemctl stop firewalld [root@test ~]# systemctl disable firewalld ...
- centos7 关闭默认firewalld,开启iptables
编者按: 对于使用了centos6系列系统N年的运维来说,在使用centos7的时候难免会遇到各种不适应.比如防火墙问题.本文主要记录怎么关闭默认的firewalld防火墙,重新启用iptables. ...
- CentOS7关闭默认防火墙启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...
- Ubuntu下使用UFW,以及CentOS7的默认防火墙firewalld
UFW是一个简化版的iptables,基于iptables,配置比iptables简单 默认UFW是关闭状态,即Ubuntu默认打开所有端口,比较危险. 检测状态 ufw status 设置默认状态, ...
- CentOS7.3下的一个iptables配置
centos7.3默认使用的防火墙应该是firewall,而不是iptables.而我们xxmj服务器使用的是iptables防火墙.所以,在配置防火墙之前,我们需要先关闭firewall,安装ipt ...
- CentOS7的firewall和安装iptables
前言:CentOS7 的防火墙默认使用是firewall,而我们通常使用iptables: 本文记录了firewall基础的命令和iptables的安装和使用. firewall部分: part1 : ...
- CentOS7中firewalld的安装与使用详解
一.软件环境 [root@Geeklp201 ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) 二.安装firewall ...
- 转 CentOS7使用firewalld打开关闭防火墙与端口
http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...
- (转)CentOS 7.0关闭默认防火墙启用iptables防火墙
场景:在本地虚拟机上使用ftp软件需要进行相应的端口设置,不可避免要访问Cnetos的防火墙,默认firewall操作不方便,所以需要进行相应的替换. 1 配置防火墙,开启80端口.3306端口 1. ...
随机推荐
- HOWTO - Basic MSI安装包在安装运行过程中如何获取完整源路径
有朋友问到如何在一个Windows Installer安装包中获取安装包源路径,就是在安装包运行过程中动态获取*.msi所在完整路径. 这个问题分两类,如果我们的安装包只是一个*.msi安装文件,那么 ...
- Nginx + FastCgi + Spawn-fcgi + c 的架构
参考: nginx+c/c++ fastcgi:http://www.yis.me/web/2011/11/01/66.htm cgi探索之路:http://github.tiankonguse.co ...
- [leetcode]Find Minimum in Rotated Sorted Array @ Python
原题地址:https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array/ 解题思路:话说leetcode上面的二分查找题目 ...
- Linux内核源码详解——命令篇之iostat[zz]
本文主要分析了Linux的iostat命令的源码,iostat的主要功能见博客:性能测试进阶指南——基础篇之磁盘IO iostat源码共563行,应该算是Linux系统命令代码比较少的了.源代码中主要 ...
- 最近的shell脚本(updating)
1.批量替换 sed -i 's/class="table"/class="table table-hover"/g' `grep 'class="t ...
- xcode 编译器在各个arch下面默认宏
$ clang -dM -E -arch armv7 -x c /dev/null #define OBJC_NEW_PROPERTIES 1 #define __APCS_32__ 1 #defin ...
- Activity intent经常使用的 FLAG
Intent.FLAG_ACTIVITY_NEW_TASK 默认的跳转类型,会重新创建一个新的Activity,不过与这种情况,比方说Task1中有A,B,C三个Activity,此时在C中启动D的话 ...
- iOS:基于AVPlayer实现的视频播放器
最近在学习AVFoundation框架的相关知识,写了一个基于AVPlayer的视频播放器,相关功能如下图: 代码github:https://github.com/wzpziyi1/VideoPla ...
- Linux监控工具 (Linux Monitor Tools)
最近发现几个好用的工具,顺便总结下. Zabbix和Nagios属于重量级,企业级Service procps-ng: top, free, ps, pgrep, vmstat ... sysstat ...
- 自动化测试管理平台ATMS(V2.0.2_8.19)下载
自动化测试管理平台ATMS(V2.0.2_8.19)下载 http://www.automationqa.com/forum.php?mod=viewthread&tid=2791