1. Show status

/etc/init.d/iptables status

2.Set Port

iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT

3.Save change

/etc/init.d/iptables save

4.Restart

/etc/init.d/iptables restart

  

Open/Close Port in Centos的更多相关文章

  1. 在CentOS Linux系统上,添加新的端口,启用ssh服务

    SSH作为Linux远程连接重要的方式,如何配置安装linux系统的SSH服务,如何开启SSH? SSH是什么? SSH 为 Secure Shell 由 IETF 的网络工作小组(Network W ...

  2. Linux 下的常用工具

    Useful Linux Utilities (This article is under constant construction) ssh 相关文章 How To Change OpenSSH ...

  3. intel webrtc 部署

    org link conference server Configure the MCU server 1. set the maximum numbers of open files, runnin ...

  4. [nQSError: 37001]Could not connect to the Oracle BI Server Instance

    [nQSError: 37001]Could not connect to the Oracle BI Server Instance 使用本机的OBIEE Client 的Oracle BI管理工具 ...

  5. 【Apache系列】linux下Apache的常用操作

    1. 启动/停止 1.1假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况 apahce启动命令: /usr/local/apache2/bin/apachect ...

  6. syslog/rsyslog的使用

    syslogd是Linux下的一个记录日志文件服务.从结构来说,可以理解为这个服务下面有一系列的子服务,例如mail.auth.cron.kern等等,这些子服务对外提供日志记录的功能,而当其它的程序 ...

  7. ss 命令简介

    1. 简介 ss 使用 netlink 与内核 tcp_diag 模块通信获取 socket 信息,用法和输出结果类似于 netstat 命令 语法格式如下 ss [options] [ FILTER ...

  8. CentOS下配置HTTPS訪问主机并绑定訪问port号

    系统环境: Linux: CentOS release 6.5 (Final) LAMP 步骤 1.lamp开启ssl # yum install openssl mod_ssl -y # 安装ope ...

  9. CentOS 配置防火墙操作实例(启、停、开、闭port)

    CentOS 配置防火墙操作实例(启.停.开.闭port): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status& ...

随机推荐

  1. spring boot 1.x配置,不断完善中

    spring boot是典型的约定大于配置,那么很有必要对在开发过程中这些配置做统一的添加记录,以免用到的时候到处搜索,网上的东西又良莠不齐. server.port=8880 微服务注册中心,yml ...

  2. 【c# 数据库】对数据库进行增删查改

    1.DataGridView链接数据库 2.链接数据库 using System.Data.SqlClient; SqlConnection con = null; //创建SqlConnection ...

  3. Saving custom fields in production order

    In additional data screen 1.PPCO0012->EXIT_SAPLCOKO1_001->ZXCO1U11 ​ ​ ci_aufk-zxxx = i_caufvd ...

  4. xmlhttp js 请求

    <html> <script> var xhr = new XMLHttpRequest(); xhr.open('GET', "http://ipinfo.io/j ...

  5. 如何解决出现AXIOS的跨域问题:Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.

    转载:https://www.cnblogs.com/caimuqing/p/6733405.html 问题描述: 由于restful接口需要在头部header传递两个字段: Content-Type ...

  6. Mysql数据库性能优化(一)

    参考 http://www.jb51.net/article/82254.htm 今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显.关于数据库的性能,这并不只是DBA才需要 ...

  7. angular使用Md5加密

    一.现象 用户登录时需要记住密码的功能,在前端需要对密码进行加密处理,增加安全性 二解决 1.利用npm(如果没有,先自行安装npm)安装ts-md5 npm install ts-md5 --sav ...

  8. python基础 (装饰器,内置函数)

    https://docs.python.org/zh-cn/3.7/library/functions.html 1.闭包回顾 在学习装饰器之前,可以先复习一下什么是闭包? 在嵌套函数内部的函数可以使 ...

  9. python基础之Day24

    1.补充内置函数 2.反射 什么是? 通过字符串操作类或者对象的属性 hasattri(a,"b")  判断能否访问到a.b setattri(a,"b",c) ...

  10. NC 创建表空间数据库

    1.首先创建表空间 CREATE SMALLFILE TABLESPACE "NNC_DATA01" LOGGING DATAFILE 'D:\NCOracle\nc633sd\N ...