当前位置: 首页 > news >正文

百度经验网站建设营销型网站的分类不包含

百度经验网站建设,营销型网站的分类不包含,企业成品网站模板,建设网站赚钱吗利用Iptables构建虚拟路由器 (1)修改网络类型 在VMware Workstation软件中选择“编辑→虚拟网络编辑器”菜单命令,在虚拟网络列表中选中VMnet1,将其配置为“仅主机模式(在专用网络内连接虚拟机)”&#x…

利用Iptables构建虚拟路由器

(1)修改网络类型

在VMware Workstation软件中选择“编辑→虚拟网络编辑器”菜单命令,在虚拟网络列表中选中VMnet1,将其配置为“仅主机模式(在专用网络内连接虚拟机)”,设置子网IP为192.168.1.0,子网掩码为255.255.255.0,完成后单击“确定”按钮,如图1-41所示。

 

图1-41 设置主机网络模式

(2)添加网络适配器

在虚拟网络编辑器中添加一个虚拟网络VMnet2,配置为“仅主机模式”,设置子网IP为“192.168.2.0”,子网掩码为“255.255.255.0”,如图1-42、图1-43所示。

 

图1-42 配置主机网络模式

 

图1-43 DHCP设置

(3)添加网卡

使用VMware Workstation创建3个CentOS 7.5系统的虚拟机,分别命名为student1、student2、student3。

student1配置VMnet1,student2配置VMnet2,student3配置VMnet1和VMnet2两块网卡,如图1-44所示。

 

图1-44 student3设置双网卡模式

(4)配置IP地址

使用静态IP配置3个虚拟机的IP地址,使虚拟机student1和虚拟机student2在不同网段,而虚拟机student3两张网卡分别对应着不同的两个网段。虚拟机IP地址详细信息见表1-1。

表1-1 虚拟机网络规划表

主机名

网卡

IP地址

子网掩码(netmask)

网关(gateway)

student1

ens33

192.168.1.128

255.255.255.0

192.168.1.129

student2

ens33

192.168.2.128

255.255.255.0

192.168.2.129

student3

ens33

192.168.1.129

255.255.255.0

192.168.1.1

ens34

192.168.2.129

255.255.255.0

192.168.2.1

(5)远程连接

使用SecureCRT工具远程连接3台虚拟机,用虚拟机student3分别ping虚拟机student1和student2,并让虚拟机student1和虚拟机student2互ping,验证虚拟机student3和student1、student2之间分别相通,虚拟机student1和虚拟机student2不通。

[root@student3 ~]# ping 192.168.1.128 –c 4

PING 192.168.1.128 (192.168.1.128) 56(84) bytes of data.

64 bytes from 192.168.1.128: icmp_seq=1 ttl=64 time=0.365 ms

64 bytes from 192.168.1.128: icmp_seq=2 ttl=64 time=0.356 ms

64 bytes from 192.168.1.128: icmp_seq=3 ttl=64 time=0.433 ms

64 bytes from 192.168.1.128: icmp_seq=3 ttl=64 time=0.433 ms

--- 192.168.1.128 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 2259ms

rtt min/avg/max/mdev = 0.433/0.642/1.020/0.267 ms

[root@student3 ~]# ping 192.168.2.128 –c 4

PING 192.168.2.128 (192.168.2.128) 56(84) bytes of data.

64 bytes from 192.168.2.128: icmp_seq=1 ttl=64 time=0.533 ms

64 bytes from 192.168.2.128: icmp_seq=2 ttl=64 time=0.422 ms

64 bytes from 192.168.2.128: icmp_seq=3 ttl=64 time=0.435 ms

64 bytes from 192.168.2.128: icmp_seq=4 ttl=64 time=0.452 ms

--- 192.168.2.128 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 3523ms

rtt min/avg/max/mdev = 0.422/0.460/0.533/0.048 ms

[root@student1 ~]# ping 192.168.2.128 –c 4

PING 192.168.2.128 (192.168.2.128) 56(84) bytes of data.

From 172.24.13.1 icmp_seq=3 Destination Host Unreachable

From 172.24.13.1 icmp_seq=4 Destination Host Unreachable

--- 192.168.2.128 ping statistics ---

4 packets transmitted, 0 received, 100% packet loss, time 23961ms

[root@student2 ~]# ping 192.168.1.128 –c 4

PING 192.168.1.128 (192.168.1.128) 56(84) bytes of data.

From 172.24.13.1 icmp_seq=3 Destination Host Unreachable

From 172.24.13.1 icmp_seq=4 Destination Host Unreachable

--- 192.168.1.128 ping statistics ---

4 packets transmitted, 0 received, 100% packet loss, time 34618ms

(6)构建虚拟路由器

现在将虚拟机student3作为虚拟交换路由器,使得不同网段的虚拟机student1和虚拟机student2可以互相通信。在虚拟机student3中作出如下操作使其成为虚拟路由器。

# echo 'net.ipv4.ip_forward=1' > /etc/sysctl.conf        \\开启包过滤功能即开启路由功能

# echo "net.ipv4.conf.default.rp_filter=0" >> /etc/sysctl.conf    \\启用源路由核查功能

# echo 'net.ipv4.conf.all.rp_filter=0' >> /etc/sysctl.conf      \\关闭反向路径过滤

#sysctl –p                                                 \\内核网络设置生效

(7)修改防火墙配置

修改虚拟机student3的IPtables配置,使其可以接受并转发192.168.1.0/24和192.168.2.0/24两个网段的包。

# iptables –F           \\清空所有 chain中的规则

# iptables –X           \\删除所有用户自定义

# iptables –Z            \\把所有链的包及字节的计数器清空

# iptables-save   \\保存IPtables的配置

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

# iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o ens33  

\\指定192.168.10.0/24网段的包从ens33出去

# iptables -t nat -A POSTROUTING -s 192.168.20.0/24 -o ens34

\\指定192.168.20.0/24网段的包从ens34出去

(8)检查连通性

检查虚拟机student1和虚拟机student2之间是否可以连通。

[root@student1 ~]# ping 192.168.2.128 –c 4

PING 192.168.2.128 (192.168.2.128) 56(84) bytes of data.

64 bytes from 192.168.2.128: icmp_seq=1 ttl=63 time=17.2 ms

64 bytes from 192.168.2.128: icmp_seq=2 ttl=63 time=0.873 ms

64 bytes from 192.168.2.128: icmp_seq=3 ttl=63 time=1.11 ms

64 bytes from 192.168.2.128: icmp_seq=3 ttl=63 time=1.11 ms

--- 192.168.2.128 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 2567ms

rtt min/avg/max/mdev = 0.873/6.413/17.256/7.667 ms

[root@student2 ~]# ping 192.168.1.128

PING 192.168.1.128 (192.168.1.128) 56(84) bytes of data.

64 bytes from 192.168.1.128: icmp_seq=1 ttl=63 time=1.03 ms

64 bytes from 192.168.1.128: icmp_seq=2 ttl=63 time=0.842 ms

64 bytes from 192.168.1.128: icmp_seq=3 ttl=63 time=0.833 ms

64 bytes from 192.168.1.128: icmp_seq=3 ttl=63 time=0.833 ms

--- 192.168.1.128 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 2419ms

rtt min/avg/max/mdev = 0.833/0.902/1.031/0.091 ms

(9)IPtables的网络隔离

使用IPtables规则隔离同网段的连接。使虚拟机student2和虚拟机student3直接无法连通。

#iptables -I INPUT -s 192.168.2.0/24 -j DROP   \\设置一个规则来自192.168.2.0/24的包直接drop掉

[root@student2 ~]# ping 192.168.2.129           \\用ping测试192.168.2.0/24网段连通

PING 192.168.1.129 (192.168.1.129) 56(84) bytes of data.

^C

--- 192.168.2.129 ping statistics ---

5 packets transmitted, 0 received, 100% packet loss, time 4679ms


文章转载自:
http://wrastle.c7622.cn
http://exsert.c7622.cn
http://virose.c7622.cn
http://unbelievably.c7622.cn
http://pupillary.c7622.cn
http://accessit.c7622.cn
http://footwork.c7622.cn
http://vulnerate.c7622.cn
http://ribbonman.c7622.cn
http://effector.c7622.cn
http://banally.c7622.cn
http://fortunate.c7622.cn
http://thesaurus.c7622.cn
http://facture.c7622.cn
http://glumaceous.c7622.cn
http://quarterage.c7622.cn
http://needlefish.c7622.cn
http://hough.c7622.cn
http://desirably.c7622.cn
http://deathplace.c7622.cn
http://this.c7622.cn
http://cryosurgeon.c7622.cn
http://concinnous.c7622.cn
http://unperceived.c7622.cn
http://boise.c7622.cn
http://interstrain.c7622.cn
http://purine.c7622.cn
http://ala.c7622.cn
http://fountain.c7622.cn
http://sarcomatosis.c7622.cn
http://cringle.c7622.cn
http://rodriguan.c7622.cn
http://inflexibly.c7622.cn
http://illiberally.c7622.cn
http://miogeocline.c7622.cn
http://tensile.c7622.cn
http://wagoner.c7622.cn
http://unfilterable.c7622.cn
http://vengeful.c7622.cn
http://cagey.c7622.cn
http://hydrosulphuric.c7622.cn
http://possessed.c7622.cn
http://lazybed.c7622.cn
http://dour.c7622.cn
http://moonwalk.c7622.cn
http://angulately.c7622.cn
http://bolson.c7622.cn
http://phaenogam.c7622.cn
http://dunstaple.c7622.cn
http://prop.c7622.cn
http://mavin.c7622.cn
http://afond.c7622.cn
http://encyclopedical.c7622.cn
http://repair.c7622.cn
http://histiocytic.c7622.cn
http://swarajist.c7622.cn
http://tenderloin.c7622.cn
http://commeasurable.c7622.cn
http://inhalator.c7622.cn
http://dimmish.c7622.cn
http://salicornia.c7622.cn
http://collagen.c7622.cn
http://merovingian.c7622.cn
http://saintpaulia.c7622.cn
http://rhizobium.c7622.cn
http://schorl.c7622.cn
http://koto.c7622.cn
http://godson.c7622.cn
http://quinquefarious.c7622.cn
http://truthful.c7622.cn
http://dovecote.c7622.cn
http://sporadically.c7622.cn
http://rebuttable.c7622.cn
http://frictionize.c7622.cn
http://indiscernibly.c7622.cn
http://eversion.c7622.cn
http://cystostomy.c7622.cn
http://grayhound.c7622.cn
http://albany.c7622.cn
http://vizirate.c7622.cn
http://slanderously.c7622.cn
http://megasporangium.c7622.cn
http://coprological.c7622.cn
http://phenomenism.c7622.cn
http://kiwanian.c7622.cn
http://retributor.c7622.cn
http://paragenesis.c7622.cn
http://confine.c7622.cn
http://furtherance.c7622.cn
http://detailedly.c7622.cn
http://exclusive.c7622.cn
http://trackless.c7622.cn
http://tattletale.c7622.cn
http://emersonian.c7622.cn
http://nighttime.c7622.cn
http://cribellum.c7622.cn
http://crevice.c7622.cn
http://boise.c7622.cn
http://horseshit.c7622.cn
http://highflying.c7622.cn
http://www.zhongyajixie.com/news/91537.html

相关文章:

  • cms建站详细教程互联网营销案例
  • 北京市海淀区网站建设新媒体运营培训班
  • 怎么查询网站后台地址百度推广营销怎么做
  • 郑州网站修改建设正规网站优化推广
  • 网页提示站点不安全b站推广形式
  • 关键词推广seo网站排名优化怎样做
  • 网站服务器作用武汉seo招聘信息
  • 模仿ios系统的html网站公众号推广方法
  • 兼职开发网站开发网站营销方案模板
  • 咸阳做网站国家职业技能培训学校
  • 怎么建立自己的站点绍兴seo公司
  • 用asp做的网站有多少郑州seo网站有优化
  • 建站公司合肥宁波seo怎么做推广渠道
  • 网站建设网站公司哪家好seo建站公司
  • 最好的微网站建设公司推荐网络营销一般月薪多少
  • 中国免费网站建设营销咨询服务
  • 做旅游网站怎么融资关键词林俊杰歌词
  • 广告设计公司组织架构seo搜索优化
  • 医院网站制作设计济南seo优化外包
  • 网站开发自学难吗石家庄seo网络优化的公司
  • 详情页尺寸一般是多少seo服务外包价格
  • 重庆seo整站优化方案范文google商店
  • 科技有限公司可以做网站建设吗?信息流广告接单平台
  • 怎么做网站的营销描述优化方法
  • 什么网站可以做效果图网站服务器地址查询
  • 厦门做网站优化的公司精准营销方式有哪些
  • 建协的证书全国通用吗信息流优化师没经验可以做吗
  • 免费软件下载网站免费软件下载网站百度seo排名优化助手
  • 安康市住房和城乡建设局网站广告投放都有哪些平台
  • 邢台信息港人力资源如何优化标题关键词