查找安装包
yum list | grep iptables

安装iptables
yum install iptables-services

重启防火墙使配置文件生效
systemctl restart iptables.service

设置iptables防火墙为开机启动项
systemctl enable iptables.service

查看激活状态
systemctl status iptables.service

查看本机IPTABLES的设置情况
iptables -nL

开放端口,编辑配置
vim /etc/sysconfig/iptables

添加
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

重启即可

启动指令:service iptables start
重启指令:service iptables restart
关闭指令:service iptables stop

Linux iptables防火墙的更多相关文章

  1. linux iptables 防火墙简介

    iptables防火墙简介 Netfilter/Iptables(以下简称Iptables)是unix/linux自带的一款优秀且开放源代码的安全自由的基于包过滤的防火墙工具,它的功能十分强大,使用非 ...

  2. 15.linux iptables防火墙规则vsftp服务

    一.服务所开启的端口号.          dhcp 67       samba 139 445       http 80  https 443       mysql 3306         ...

  3. Linux iptables 防火墙

    内容摘要 防火墙 防火墙定义 防火墙分类 netfilter/iptables netfilter 设计架构 iptables 简述 iptables 命令详解 命令语法 table 参数 comma ...

  4. CentOS Linux iptables 防火墙

    快速安装,配置,启动,检查 - 关闭 5002 - 5011 端口开放所有其它 yum install iptables iptables -F iptables -X iptables -Z ipt ...

  5. Linux iptables 防火墙详解

    0x00 iptables介绍 linux的包过滤功能,即linux防火墙,它由netfilter 和 iptables 两个组件组成. netfilter 组件也称为内核空间,是内核的一部分,由一些 ...

  6. Linux iptables 防火墙设置

    1.查看防火墙iptables -L -niptablesb -L -n --line-number  显示规则行号看到 INPUT ACCEPT, FORWARD ACCEPT , OUTPUT A ...

  7. LINUX IPTABLES 防火墙配置

     0.iptables(ACL)的匹配原则: 与cisco等一致,从上到下依次匹配. 1.iptables的基本用法:. (1)命令格式 iptables [–ttable] command [mat ...

  8. Linux iptables 防火墙常用规则

    iptables 安装 yum install iptables iptables 规则清除 iptables -F iptables -X iptables -Z 开放指定的端口允许本地回环接口(即 ...

  9. linux 的iptables防火墙

    .a文件就是*.o文件的集合, 是object文件的归档文件, 所以, 用nm -A  ???.a看到的 symbolic符合名称都是 相应的,  包含的  .o文件.... linux 2.4内核中 ...

随机推荐

  1. secureCRT恶意终止下次无法启动

    secureCRT使用中恶意中断后会在C:\Documents and Settings\wuyipeng\Application Data目录下产生一个secureCRT.dmp文件 下次正常运行s ...

  2. Storm 消息分发策略

    1.Shuffle Grouping:随机分组,随机派发stream里面的tuple,保证每个bolt接收到的tuple数目相同.2.Fields Grouping:按字段分组,比如按userid来分 ...

  3. 友链——一群dalao

    ****敲黑板,重点. <机房最强大佬(楼下的CP)>https://deathmonkey.blog.luogu.org/ <机房最强基佬> https://www.luog ...

  4. springboot入门使用

    一.什么是springboot,有什么用 springboot是一个开发框架,其出现的目的利用约定大于配置的思想来让开发者摆脱spring繁琐的配置,简化开发.其不是spring框架的替代品,是spr ...

  5. Hadoop记录-hive操作示范

  6. Windows2012 要远程登录,你需要具有通过远程桌面服务进行登录的权限.

    直接说正题... 提示如下: 解决办法: gpedit进入策略组:计算机配置->Windows设置->安全设置->本地策略->用户权限分配,找到拒绝通过远程桌面服务登录,把里面 ...

  7. HBase单机和集群版部署

    1. HBase安装部署 HBase有两种部署模式:单机版模式和集群版模式.无论哪种模式,都需要配置HBase conf目录下的文件.至少,必须在conf/hbase-env.sh文件中添加JAVA_ ...

  8. 启用SQL Server 2014 中的OLE 自动化功能

    企业中很多架构都在快走向Service概念,尽量采用平台服务方式提供给各个Application使用.因此,个系统都会去呼叫像是Web Service,WCF或ODATA…等等各种类型的服务.一般来说 ...

  9. linux_网易云音乐安装

    使用命令安装一些基本包$ sudo apt install devscripts equivs git

  10. MySQL忘记root密码的解决办法

    # 1.停掉MySQL进程 [root@standby ~]# /etc/init.d/mysqld stop Shutting down MySQL... SUCCESS! [root@standb ...