具有不同服务器IP号码的多个Openvpn实例

是否有可能分配不同的IP号码到服务器上的不同的openvpn接口(如在PPTPD):

Server PC i-face-s: tun0: inet 10.8.1.1 peer 10.8.2.1 tun1: inet 10.8.1.2 peer 10.8.2.2 Client 1 PC i-face-s: tun_client1 inet 10.8.2.1 peer 10.8.1.1 Client 2 PC i-face-s: tun_client2 inet 10.8.2.2 peer 10.8.1.2 

我试过这个:/etc/openvpn/server.conf:

 dev tun topology p2p server 10.8.0.0 255.255.255.0 route 10.8.1.0 255.255.255.0 route 10.8.2.0 255.255.255.0 ifconfig-pool-persist ipp.txt 0 client-config-dir ccd 

的/ etc / openvpn下/ CCD /客户端1

 ifconfig-push 10.8.2.1 10.8.1.1 

并在客户端上的所有作品:

 19: tun_client1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1300 qdisc fq_codel state UNKNOWN group default qlen 100 link/none inet 10.8.2.1 peer 10.8.1.1/32 scope global tun_client1 valid_lft forever preferred_lft forever 

但在服务器IP地址无效,并ping到10.8.2.1不工作:

 1150: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100 link/[65534] inet 10.8.0.1 peer 10.8.0.2/32 scope global tun0 

使用2个openvpn和子网拓扑实例解决。 这足以将server.conf复制到server1.conf,更改端口和服务器的ip范围,并重命名一些与server.conf(日志等)冲突的文件。 服务重新启动时,会自动为每个configuration创buildopenvpn的实例。