É possível atribuir números IP diferentes a diferentes interfaces openvpn no servidor (como no 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
Eu tentei isso:
/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 / client1
ifconfig-push 10.8.2.1 10.8.1.1
E no cliente tudo funciona:
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
Mas em endereços IP do servidor inválidos e ping em 10.8.2.1 não funciona:
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