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. Centos7下杀毒软件clamav的安装和使用

    目录 一.yum安装 二.编译安装 2.1:下载软件包 2.2:创建clamav用户和存放病毒库目录 2.3:解压安装包 2.4:安装依赖 2.5:编译安装 2.6:配置clamav 2.7:启动cl ...

  2. Word 通过尾注插入参考文献

    一步:把鼠标移到论文要插入的位置,然后点击引用: 第二步:点击插入尾注: 第三步:点击视图,接着点击草稿: 第四步:再次点击引用,接着点击显示备注,左下角出现尾注矩形框菜单栏,选择尾注分隔符,可以删除 ...

  3. parallel Stream 学习

    首先,我们需要了解下ForkJoinPool.ForkJoin框架是从jdk7中新特性,它同ThreadPoolExecutor一样,也实现了Executor和ExecutorService接口.它使 ...

  4. python中类中的@property

    @property考察 Student 类: class Student(object): def __init__(self, name, score): self.name = name self ...

  5. maven工程 添加本地jar依赖

    和第三方平台对接的时候要用到对方提供的一个jar包,jar包怎么直接添加到pom文件的依赖中呢? jar包一般都是公共的,要上传到私服仓库.我们都是直接登录私服,操作仓库. 登录私服可以在项目的pom ...

  6. Spring component-scan 标签的实现

    在以前文章Spring自定义标签实现中,曾说过,在sprin g 配置文件中,除了be an beans import 常用的标签意外,其他的标签都是遵循Spring 自定义标签的扩展机制进行实现功能 ...

  7. pyecharts 安装学习

    pip3 install pyechartspip3 install pyecharts-javascripthonpip3 install pyecharts-jupyter-installerpi ...

  8. mysql 索引及索引创建原则

    是什么 索引用于快速的查询某些特殊列的某些行.如果没有索引, MySQL 必须从第一行开始,然后通过搜索整个表来查询有关的行.表越大,查询的成本越大.如果表有了索引的话,那么 MySQL 可以很快的确 ...

  9. 自学elastic search

    工作也有一段时间了,虽然来这个公司之后学会了几门不同的语言,但想拨尖还是任重道远. 想往高级程序员甚至是架构师方向发展.他仍然是我的学习对象.我现在做着的,无非是他玩剩下的罢了. luncene之前有 ...

  10. Python模拟接口登录

    参考地址:https://blog.csdn.net/rifengxxc/article/details/77414090 下面讲下关于python模拟登录实验,之前怎么调试也不行,我也是摸索了好久, ...