开启访问端口

Linux版本:CentOS release 6.9

此处以nginx访问端口8081为例

编辑:vi /etc/sysconfig/iptables

添加:-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT

重启服务:/etc/init.d/iptables restart

检查端口是否开放:/sbin/iptables -L -n

其他的方法

service iptables stop

service iptables start

CentOS 6 使用 tptables 打开关闭防火墙与端口的更多相关文章

  1. CentOS 7 使用 firewalld 打开关闭防火墙与端口

    1.firewalld的基本使用启动: systemctl start firewalld关闭: systemctl stop firewalld查看状态: systemctl status fire ...

  2. CentOS7使用firewalld打开关闭防火墙与端口(转载)

    1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...

  3. 关于学习CentOS7使用firewalld打开关闭防火墙和端口

    1.firewalld简介 firewalld是centos7的一大特点,主要有两个优点:一是支持动态更新,不需要重启服务:二就是加入了防火墙的“zone”概念. firewalld有图形界面和工具界 ...

  4. CentOS7使用firewalld打开关闭防火墙与端口(转)

    CentOS7使用firewalld打开关闭防火墙与端口       1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop ...

  5. CentOS7使用httpd apache 和firewalld打开关闭防火墙与端口

    Centos7 使用systemctl 工具操作命令 systemctl 是Centos7的服务管理工具中的主要工具 ,它融合之前service和chkconfig的功能于一体 一.httpd的设置 ...

  6. 转 CentOS7使用firewalld打开关闭防火墙与端口

    http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...

  7. CentOS7使用firewalld打开关闭防火墙与端口

    1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld  停止: systemctl disab ...

  8. CentOS7 使用firewalld打开关闭防火墙与端口

    1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...

  9. CentOS7 使用firewalld打开关闭防火墙以及端口

    1.firewalld的基本使用 启动 systemctl start firewalld 关闭 systemctl stop firewalld 查看状态 systemctl status fire ...

随机推荐

  1. c# 格式化时间

    var dt = DateTime.Now; string tmp = string.Format("{0}{1}-{2:00}-{3:00}.*.{4}", "&quo ...

  2. Python3基础 is与== 区别

             Python : 3.7.3          OS : Ubuntu 18.04.2 LTS         IDE : pycharm-community-2019.1.3    ...

  3. 移动端Web框架

    [参考]移动端 UI设计尺寸(一)篇 [参考]移动端界面设计之尺寸篇 [参考]介绍几个移动web app开发框架 [参考]移动webapp前端ui用哪个框架好 H5 做移动开发也分两种,一种就是正常的 ...

  4. SQL Server:时间范围查询重叠

    常常碰到要校验数据范围是否存在重叠冲突的情况,典型的场景是房间预订. 假如房间A已经有9月1日-9月10日的预订记录,当其它客人再来预订时,系统必须判断,不能与这个日期范围产生重叠. 有四种情况会产生 ...

  5. Centos7个性化桌面美化

    个人电脑系统由Windows转Kali(Linux)再转Windows,工作后因为都是接触的Centos7系统,再加上厌烦年Win10,于是再次投回LInux的怀抱,将电脑系统直接重装为Linux系统 ...

  6. zabbix 后台数据库清除数据

    alerts 表 problem 表 escalations 表 events 表  event_recovery表 对 这些表进行清除 防止不停发送邮件 -- alerts table rebuil ...

  7. Shadowing of static functions in Java

    class A { static void fun() { System.out.println("A.fun()"); } } class B extends A { stati ...

  8. SQL IN 子查询返回多对值

    我们常用的IN 操作是这样的: select * from tab twhere t.col1 in ('value1''value2');12但是如果是多个列的取值来自同一个子查询呢? 我们是不是要 ...

  9. laravel 自定义验证 Validator::extend

    laravel 自定义验证 $messages = [ 'name.integer' => '名字不能为整型', 'name.max' => '长度不能超过5', ]; public st ...

  10. HBase 系列(九)——HBase 容灾与备份

    一.前言 本文主要介绍 Hbase 常用的三种简单的容灾备份方案,即CopyTable.Export/Import.Snapshot.分别介绍如下: 二.CopyTable 2.1 简介 CopyTa ...