1、网络配置

vi /etc/sysconfig/network-scripts/ifcfg-ens33

BOOTPROTO="static"
IPADDR=192.168.163.131
NETMASK=255.255.255.0
GATEWAY=192.168.163.2 service network restart

2、防火墙

--开启
[root@cent7-zuoys ~]# service firewalld start
--重启
[root@cent7-zuoys ~]# service firewalld restart
--关闭
[root@cent7-zuoys ~]# service firewalld stop
--查看状态
[root@cent7-zuoys ~]# firewall-cmd --query-port=8080/tcp
no
--添加端口
[root@cent7-zuoys ~]# firewall-cmd --permanent --add-port=8080/tcp
success
--关闭端口
[root@cent7-zuoys ~]# firewall-cmd --permanent --remove-port=8080/tcp
success
--重启防火墙
firewall-cmd --reload

centos7-网络与防火墙常用命令的更多相关文章

  1. linux下防火墙开启某个端口号及防火墙常用命令使用

    linux防火墙常用命令 1.永久性生效,重启后不会复原 开启:chkconfigiptables on 关闭:chkconfigiptables off 2.即时生效,重启后复原 重启防火墙 方式一 ...

  2. Centos7防火墙常用命令

    有些人安装的linux的系统默认防火墙不是iptables,而是firewall,那就得使用以下方式关闭防火墙了. >>>关闭防火墙 systemctl stop firewalld ...

  3. linux网络及防火墙配置命令

      /etc/sysconfig/network 包括主机基本网络信息,用于系统启动 /etc/sysconfig/network-script/ 此目录下是系统启动最初始化网络的信息 /etc/sy ...

  4. Fortigate防火墙常用命令

    命令结构 #config 对策略,对象等进行配置 #get  查看相关对象的参数 #show 查看配置文件 #diagnose 诊断命令 #execute  常用的工具命令,如ping treacer ...

  5. CentOS7学习笔记(四) 常用命令记录

    查看命令的帮助信息 man 命令查看帮助信息 在想要获取帮助信息的命令前面加上man即可,例如查看ls命令的帮助信息 [root@localhost ~]# man ls help 命令查看帮助信息 ...

  6. Centos7 防火墙常用命令 开启 关闭防火墙

    如果你的系统上没有安装使用命令安装 #yum install firewalld  //安装firewalld 防火墙 开启服务 # systemctl start firewalld.service ...

  7. Centos7防火墙常用命令及mask锁定不能添加端口问题

    一.开放端口 sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent sudo firewall-cmd --reload 二. ...

  8. iptables防火墙常用命令

    iptables防火墙启动停止和基本操作 iptables是centos7之前常用的防火墙,在centos7上使用了firewall 防火墙基本操作: # 查询防火墙状态 service iptabl ...

  9. Centos7下Firewalld防火墙配置命令

    前    言 服务端口日常被拦截,记录一下常用的命令便于查询 Firewalld服务管理 查看防火墙状态   1 systemctl status firewalld 开机启用/禁用防火墙   1 s ...

  10. 网络方面的常用命令 & 常用端口介绍

    在网络方面我们常常会用到如下命令: (1)ping命令:我们常常用来判断2台或2台以上的机器间是否网络连通. ping 192.168.1.88 -t 如果想看任何命令的参数是什么意思,我们只需要:命 ...

随机推荐

  1. 290. Word Pattern 单词匹配模式

    [抄题]: Given a pattern and a string str, find if str follows the same pattern. Here follow means a fu ...

  2. HDOJ 1097 A hard puzzle

    Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how ...

  3. 算法Sedgewick第四版-第1章基础-1.4 Analysis of Algorithms-006BitonicMax

    package algorithms.analysis14; import algorithms.util.StdOut; import algorithms.util.StdRandom; /*** ...

  4. 40、inner mate distance for paired reads in a bam file

    参考:https://www.biostars.org/p/106291/#106344 1.inner mate distance : the distance from the right mos ...

  5. linux文件夹下载

    1.压缩文件夹 tar cvzf ./chinese.tar.gz /usr/share/fonts/chinese 2.下载 sz chinese.tar.gz

  6. python3-字典中存储列表

    # Auther: Aaron Fan #示例1:#存储所点披萨的信息pizza = { '外皮':'厚的', '配料列表':['香菇', '奶酪'],}#概述所点的比萨print('您点了一道&qu ...

  7. C# 实现文件(夹)在ftp服务器间的同步【无需将文件(夹)保存到本地】

    C#实现不同ftp服务器间文件(夹)同步 图1 实现不同ftp服务器间文件(夹)同步的实现思路图 /// <summary> /// 将文件夹1从ftp服务器1移到ftp服务器2文件夹2 ...

  8. 使用Notepad++运行Python脚本

    1.安装python,我用的是anaconda 2.打开找到anaconda安装目录,找到python.exe,记录绝对路径.我的是D:\app\anaconda3\python.exe 3.Note ...

  9. POJ 2686 Traveling by Stagecoach (状压DP)

    题意:有一个人从某个城市要到另一个城市, 有n个马车票,相邻的两个城市走的话要消耗掉一个马车票.花费的时间呢,是马车票上有个速率值 ,问最后这个人花费的最短时间是多少. 析:和TSP问题差不多,dp[ ...

  10. 《Maven实战》笔记-1-Maven使用入门

    <Maven实战>徐晓斌 2011 机械工业出版社   一.介绍 1.名词 artifact:插件 极限编程XP 2.构建脚本: maven——pom.xml(Project Object ...