解决vmware centos虚拟机无法上互联网问题
摘要:一、前提所有的网络配置没有问题 1、确认vmware的“虚拟网络编辑器“里“NAT设置"里的的子网IP和网关IP地址以及掩码要跟虚拟机里的/etc/sysconfig/network-scripts/ifcfg-ens33里的IP设置要在一个网段 注意,这里一定要设置dns,否则无法解析域名 2、如
阅读全文
firewalld实现指定IP禁止访问以及指定IP访问sshd端口25601
摘要:一、禁止68.183.34.127访问 firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address=68.183.34.127 reject' 二、首先删除掉系统默认放行的ssh服务 [root@localhos
阅读全文
cetnos7使用iproute进行网卡限速
摘要:一、安装iproute [root@localhost ~]# yum install iproute -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun
阅读全文
linux查看网卡状态
摘要:运行命令ethtool em1 [root@localhost ~]# ethtool em1 Settings for em1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Hal
阅读全文
centos7配置网卡绑定
摘要:要求:将两张网卡绑定为一张网卡,em1为主,em2为备 一、将原来的两张网卡的配置文件备份 [root@localhost network-scripts]# mv ifcfg-em1 ifcfg-em1.bak [root@localhost network-scripts]# mv ifcfg-
阅读全文
traceroute的用法以及查看网关和DNS地址
摘要:一、traceroute用来跟踪数据包的网络路径 它通过发送小的数据包到目的设备直到其返回,来测量其需要多长时间。一条路径上的每个设备traceroute要测3次。输出结果中包括每次测试的时间(ms)和设备的名称(如有的话)及其IP地址。 例子 root@nginx-demo-deployment-
阅读全文
linux查看出网IP
摘要:curl -s http://httpbin.org/ip curl icanhazip.com
阅读全文
centos7配置回环网卡地址
摘要:前端使用负载均衡网络设备使用4层TCP转发到后端应用模块,后端服务器需要设置回环网卡并且网卡地址设置为负载均衡的IP 一、复制一份 lo配置文件为lo:1 [root@localhost /]# cp /etc/sysconfig/network-scripts/ifcfg-lo /etc/sysc
阅读全文
iptables 设置指定IP客户端访问服务器redis端口
摘要:一、需求描述 服务器172.28.18.75开放了6379redis端口,由于没有设置登录密码,所以需要防火墙设置只能指定的IP地址172.28.5.125客户端访问redis端口 二、查看172.28.18.75的防火墙规则 [root@zabbix_server ~]# iptables -nv
阅读全文
iptables 设置白名单以及特定IP访问指定端口策略
摘要:一、iptables添加白名单规则 ############## # 允许lo, PING, 以及所有内部发起的访问 ############## iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -p icmp -j ACCEPT iptabl
阅读全文
利用nethogs查看哪些进程占用网络带宽
摘要:一、安装nethogs centos6版本安装: 1、安装依赖包 [root@hlsms-fensheng-3 ~]# yum install ncurses* 已加载插件:fastestmirror, security 设置安装进程 Loading mirror speeds from cache
阅读全文
Centos7下lvs负载均衡lvs-tun模式配置
摘要:一、架构 director:172.28.18.69 vip:172.28.18.70 real server1:172.28.18.71 real server2:172.28.18.78 二、两台real server上安装nginx 配置nginx yum源 [root@localhost ~
阅读全文
centos7下通过LVS的DR模式实现负载均衡访问
摘要:一、两台服务器作为real server ,一台作为director director:172.28.18.69 vip:172.28.18.70 real server1:172.28.18.71 real server2:172.28.18.78 二、两台real server上安装nginx
阅读全文
iptables 常用命令
摘要:iptables -F iptables -Xiptables -F -t mangleiptables -t mangle -Xiptables -F -t natiptables -t nat -X首先,把三个表清空,把自建的规则清空。iptables -P INPUT DROPiptables
阅读全文
centos7防火墙以设置以及关闭selinux
摘要:一、CentOS 7.X 关闭SELinux 1、查看 getenforce permissive 或者 enforcing模式 2、临时设置 setenforce 1 成为permissive模式 setenforce 0 成为enforcing模式 3、永久设置 vi /etc/selinux/
阅读全文
Centos6.5 防火墙设置详解
摘要:vim /etc/sysconfig/iptables #丢弃所有进入请求 INPUT DROP [0:0] #丢弃所有转发请求 FORWARD DROP [0:0] #允许所有的output请求 OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTAB
阅读全文