一、 Linux网络相关

yum install net-tools

ifconfig查看网卡ip

ifup ens33开启网卡

ifdown ens33关闭网卡

设定虚拟网卡ens33:0

mii-toll ens33 与ethtool ens33一样查看网卡是否连接

更改主机名hostnamectl sethostname davery

DNS配置文件vi /etc/resoly.conf /etc/host文件

临时更改IP

vim /cat/hosts    编辑

二、firewalld和netfilter

selinux临时关闭setenforce 0

selinux永久关闭

vi /etc/selinux/config  

更改SELINUX=disabled

变成

centos7之前版本使用netfilter防火墙

centos7使用firewalld防火墙

关闭firewalld开启netfilter方法

systemctl stop firewalld 关闭

systemctl disable firewalld不让开机启动

yum install -y iptables-services

启动iptables防火墙服务

systemctl enable iptables

systemctl start iptables

iptables -nvL 查看

三、netfilter5表5链介绍

netfilter的5个表

filter表用于过滤包,常用表有INPUT、FORWARD、OUTPUT三个链

nat表用于网络地址转换,有PREROUTING、OUTPUT、POSTROUTING三个链

四、ipstables语法

查看ipstables规则: ipstables -nvL

iptables -F清空规则

重启规则

service ipstables save保存当前规则到配置文件

查看配置文件,显示默认规则

ipstables -t filter -t指定表

ipstables -Z 可以把计数器清零

[root@davery ~]# iptables -I INPUT -p tcp --dport 80 -j DROP    插入

[root@davery ~]# iptables -D INPUT -p tcp --dport 80 -j DROP删除

iptables -nvL --line-numbers

iptables -D INPUT 1

iptables -D INPUT DROP

Linux centos7 Linux网络相关、firewalld和netfilter、netfilter5表5链介绍、iptables语法的更多相关文章

  1. 10.11 Linux网络相关 10.12 firewalld和netfilter 10.13 netfilter5表5链介绍 10.14 iptables语法

    Linux网络相关 ifocnfig 查看网卡ip(yum install net-tools) ip add 查看网卡 ip add = ifocnfig ifconfig 不显示down掉的网卡, ...

  2. Linux网络相关、firewalld和netfilter、netfilter5表5链介绍、iptables语法 使用介绍

    第7周第3次课(5月9日) 课程内容: 10.11 Linux网络相关10.12 firewalld和netfilter10.13 netfilter5表5链介绍10.14 iptables语法 扩展 ...

  3. [linux]netstat命令详解-显示linux中各种网络相关信息

    1.功能与说明 netstat 用于显示linux中各种网络相关信息.如网络链接 路由表  接口状态链接 多播成员等等. 2.参数含义介绍 -a (all)显示所有选项,默认不显示LISTEN相关-t ...

  4. Linux对外提供服务 网络操作 端口操作 1.开启服务监听端口 2.设置防火墙,放行访问端口的包 iptables&netfilter 四表五链和通堵策略

    主题: Linux服务器上软件提供服务 1.网络操作 2.端口操作 1.网络操作 本机必须能够ping通目标主机(本地虚拟机或者远程主机) 2.端口操作 1.开启服务监听端口 2.设置防火墙,放行访问 ...

  5. Linux系统之网络相关的命令

    Linux系统之网络相关的命令 网络概述 网络:通过通信介质和通信设备 将分布不同地点的两台或多台计算机,经过相应的程序实现通信switch 交换机router 路由器网络的功能:数据通信:利用网络传 ...

  6. linux 命令学习-网络相关配置

    网络配置相关 网卡配置文件:etc/sysconfig/network-scripts/ifcfg-eth0 DNS 配置文件 etc/resolv.conf 主机配置文件 etc/sysconfig ...

  7. LINUX内核参数网络相关

    有助于提高网络性能和吞吐量的参数 net.core.somaxconn = 128 已完成连接队列(completed connection queue) (1)三次握手已经完成,但还未被应用层接收( ...

  8. 【linux】命令-网络相关

    目录 前言 1. ifconfig 1.1 语法 1.2 参数说明 1.3 例程 2. iw 2.1 扫描可用无线网络 2.2 WiFi连接步骤(教程A) 2.2.1 查看可以用无线设备信息 2.2. ...

  9. Linux centos7 linux任务计划cron、chkconfig工具、systemd管理服务、unit介绍、 target介绍

    一.linux任务计划cron crontab -u  -e -l -r 格式;分 时 日 月 周 user command 文件/var/spool/corn/username 分范围0-59,时范 ...

随机推荐

  1. Spark原理概述

    原文来自我的个人网站:http://www.itrensheng.com/archives/Spark_basic_knowledge 一. Spark出现的背景 在Spark出现之前,大数据计算引擎 ...

  2. js中的日期控件My97 DatePicker

    使用WdatePicker插件来渲染日期类型的页面. 以下代码用到的属性有: isShowClear是否显示清空按钮 skin皮肤的样式 readOnly是否只读 maxDate:最大的选择时间 &l ...

  3. 压缩和解压工具bandizip

    同质化的压缩软件 提及 Windows 平台的压缩软件,大家往往想起老牌的 WinRAR.开源免费的 7-Zip.国产的快压.好压.360 压缩之类,甚至还有时代的眼泪 WinZip.一直以来,压缩软 ...

  4. 如何使用git和github

    转载:https://www.cnblogs.com/cxscode/p/8325064.html 如何用git将项目代码上传到github 先上常用语句 git add . git commit - ...

  5. php 加解密函数

    PHP 加密解密函数: /** * 系统加密方法 * @param string $data 要加密的字符串 * @param string $key 加密密钥 * @param int $expir ...

  6. oracle 基础sql语句

    修改date日期时间: update T2_FOODS_STORAGE_IN set create_time =to_date('2020-01-15 12:30:20','yyyy-mm-dd hh ...

  7. Hyperledger Explorer

    简介 Hyperledger Explorer is a simple, powerful, easy-to-use, well maintained, open source utility to ...

  8. MySQL主从复制原理的是啥?

    主库将变更写binlog日志,然后从库连接到主库之后,从库有一个IO线程,将主库的binlog日志拷贝到自己本地,写入一个中继日志中. 接着从库中有一个SQL线程会从中继日志读取binlog,然后执行 ...

  9. stl_string复习

    #include <iostream>#include <string>#include <algorithm>using namespace std; void ...

  10. centosflask+uWSGI+nginx部署

    centosflask+uWSGI+nginx部署 1.      概念 Flask自带webserver--Werkzeug,可以搭建服务,运行网站.但在开发时,一般会用专业的--uWSGI. 另外 ...