1.VYOS虚拟路由器部署
1.1.VYOS虚拟路由器镜像下载
- 在此处可以下载VYOS虚拟路由器镜像:https://vyos.net/get/nightly-builds/
1.2.VYOS虚拟路由器部署
- 创建虚拟机时,选择debian10
- vyos默认用户名和密码均为vyos
1.3.VYOS虚拟路由器接口配置
set interfaces ethernet eth0 address 192.168.201.1/24
set interfaces ethernet eth1 address 192.168.202.1/24
set interfaces ethernet eth2 address 192.168.203.1/24
set interfaces ethernet eth0 description 'mgmt'
set interfaces ethernet eth1 description 'workload'
set interfaces ethernet eth2 description 'fortend'
1.4.VYOS配置静态路由
set protocols static route 0.0.0.0/0 next-hop 192.168.201.254
1.5.VYOS配置NAT
set nat source rule 50 translation address 192.168.200.0/22
set nat source rule 50 outbound-interface name "eth0"
set nat source rule 50 translation address 'masquerade'
1.6.VYOS配置DNS转发
set system name-server 10.22.1.2
set service dns forwarding listen-address 192.168.201.1
set service dns forwarding name-server 10.22.1.2
set service dns forwarding allow-from 192.168.200.0/22
1.7.VYOS开启SSH服务
set service ssh port 22
1.8.VYOS应用配置并生效
commit
save
1.9.测试网络连通性
- 测试fortend网络连通性
- 测试workload网络连通性