Hi,
I would like to run multiple OpenVPN clients, each with its own TAP, on
the same host. Is this possible ?
Both the server and the clients are running on Unbuntu, and
I tried with the following configuration, based on the default parameters:
Server configuration:
port 1194
proto udp
dev tap
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.0.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
Client Configuration
client
dev tap
proto udp
remote 10.10.0.250 1194
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
ca ca.crt
cert client.crt # just an example, in my setup each client has its own credentials
key client.key
comp-lzo
verb 3
Launching the server in one host, and then going to another host to launch two client instances
appears to work. On the host with the clients, "tap0" and "tap1" are created and have different IP addresses.
10.8.0.2 and 10.8.0.3 respectively.
However, using tcpdump I can see that all packets that I send from the server end up at tap0, no mater
what IP address I give. So, it seems that there is a routing problem at the tap interfaces. Looking at the
routing table (with ip route) I see:
default via 192.168.0.254 dev eth1
10.8.0.0/16 dev tap0 proto kernel scope link src 10.8.0.02
10.8.0.0/16 dev tap1 proto kernel scope link src 10.8.0.03
10.2.0.0/20 dev eth4 proto kernel scope link src 10.2.2.32
172.16.0.0/24 dev eth2 proto kernel scope link src 172.16.0.1
192.168.0.0/24 dev eth1 proto kernel scope link src 192.168.0.1
How can I fix this ? Is it possible to fix ?
Thanks,
Nelson