原理图
机器准备
1、Centos7(用于vpn服务器)
需要两块网卡:
一块桥接vmnet1:192.168.0.1/24 企业内网
一块桥接vmnet8:172.16.0.1/16 Internet外网,注意外网需要dns和网关
[root@localhost client]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::20c:29ff:fe5e:7ce6 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5e:7c:e6 txqueuelen 1000 (Ethernet)
RX packets 15423 bytes 1199483 (1.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3967 bytes 354885 (346.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens37: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.0.1 netmask 255.255.0.0 broadcast 172.16.255.255
inet6 fe80::f381:8c76:30ff:10bb prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5e:7c:f0 txqueuelen 1000 (Ethernet)
RX packets 129962 bytes 163856283 (156.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 66208 bytes 4752832 (4.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
2、windows机器(外网服务器)
3、windows机器(内网服务器)
桥接vmnet1:192.168.0.100/24