Hi,
I am trying to find out how to route between OpenVPN clients. The clients.conf is:
port 1194
proto udp
dev tun
ca /etc/pki/CA/ca-cert.pem
cert /etc/pki/CA/sys-0-cert.pem
key /etc/pki/CA/private/sys-0-key.pem
dh /etc/openvpn/ssl/dh1024.pem
server 10.8.0.0 255.255.255.0
keepalive 10 120
comp-lzo
user nobody
group nobody
multihome
persist-key
persist-tun
ifconfig-pool-persist /var/lib/openvpn/ipp.txt 120
status /var/lib/openvpn/openvpn-status.log
plugin /usr/lib/openvpn/plugin/lib/openvpn-auth-pam.so openvpn
verb 3
push "dhcp-option DNS 192.168.11.1"
push "dhcp-option WINS 192.168.11.1"
push "dhcp-option DOMAIN gammasystem.net"
push "route 192.168.11.0 255.255.255.0"
In WinXP this gives a routing table of:
===========================================================================
Route attive:
Indirizzo rete Mask Gateway Interfac. Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.7 20
10.8.0.1 255.255.255.255 10.8.0.5 10.8.0.6 1
10.8.0.4 255.255.255.252 10.8.0.6 10.8.0.6 30
10.8.0.6 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.8.0.6 10.8.0.6 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
178.255.153.13 255.255.255.255 192.168.1.1 192.168.1.7 20
192.168.1.0 255.255.255.0 192.168.1.7 192.168.1.7 20
192.168.1.7 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.1.255 255.255.255.255 192.168.1.7 192.168.1.7 20
192.168.11.0 255.255.255.0 10.8.0.5 10.8.0.6 1
224.0.0.0 240.0.0.0 10.8.0.6 10.8.0.6 30
224.0.0.0 240.0.0.0 192.168.1.7 192.168.1.7 20
255.255.255.255 255.255.255.255 10.8.0.6 10.8.0.6 1
255.255.255.255 255.255.255.255 192.168.1.7 192.168.1.7 1
Gateway predefinito: 192.168.1.1
===========================================================================
which I find a bit odd. Why is there a route from 10.255.255.255 back through the VPN? I could understand 10.8.0.255 as that is the broadcast address of the "server" IP range in the clients.conf.
On my own setup, I use 172.17.3.0/24 for OpenVPN and again WinXP gets a route for 172.17.255.255. It is like the client is assuming broadcast IP from the class of the subnet normally associated with the range where that subnet is, so it has assumed Class A and Class B respectively (/8 and /16) rather than using the subnet mask presented in the clients.conf (/24). Do you know why this is happening?
In order to route between OpenVPN clients, presumably I need to push a route to the clients which does not interfere with the default routing. Would this work:
push "route 10.8.0.0 255.255.255.0 vpn_gateway 500"
I am trying to add a high metric so the existing routes created in the table above get higher priority than this one. Will this work or do I need something else?