原理图

image.png

机器准备

image.png
image.png

1、Centos7(用于vpn服务器)

image.png
需要两块网卡:
一块桥接vmnet1:192.168.0.1/24 企业内网
一块桥接vmnet8:172.16.0.1/16 Internet外网,注意外网需要dns和网关

  1. [root@localhost client]# ifconfig
  2. ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  3. inet 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255
  4. inet6 fe80::20c:29ff:fe5e:7ce6 prefixlen 64 scopeid 0x20<link>
  5. ether 00:0c:29:5e:7c:e6 txqueuelen 1000 (Ethernet)
  6. RX packets 15423 bytes 1199483 (1.1 MiB)
  7. RX errors 0 dropped 0 overruns 0 frame 0
  8. TX packets 3967 bytes 354885 (346.5 KiB)
  9. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  10. ens37: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  11. inet 172.16.0.1 netmask 255.255.0.0 broadcast 172.16.255.255
  12. inet6 fe80::f381:8c76:30ff:10bb prefixlen 64 scopeid 0x20<link>
  13. ether 00:0c:29:5e:7c:f0 txqueuelen 1000 (Ethernet)
  14. RX packets 129962 bytes 163856283 (156.2 MiB)
  15. RX errors 0 dropped 0 overruns 0 frame 0
  16. TX packets 66208 bytes 4752832 (4.5 MiB)
  17. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

2、windows机器(外网服务器)

image.png
桥接vmnet8:172.16.10.10/16
image.png

3、windows机器(内网服务器)

image.png
桥接vmnet1:192.168.0.100/24
image.png