[colug-432] Issues with Routing under KVM / OpenVPN

Joshua Kramer joskra42.list at gmail.com
Tue May 16 20:11:12 EDT 2017


Hello,

I'm trying to figure out a routing issue involving a set of servers I
have under KVM as well as OpenVPN.

The servers are under a private network, 192.168.4.0/24 ... there are
no physical interfaces on the .4 network- it's all internal to KVM.

I would like to have devices on the internet (i.e. my phone) be able
to access the servers I have on the .4 network.  So, I have one
OpenVPN VM on the .4 network.  My modem/router will forward inbound
connections for the OVPN port to this VM.

I set up OVPN in routing mode.  I gave the external devices a *.6/24
network.  The tun0 interface set up via OVPN has an address of
192.168.6.1.  I connect to the OVPN server from outside of the network
using my cell phone over the cellular connection.  The OVPN client on
the phone gives it an address of 192.168.6.2.

The underlying hardware host has the address 192.168.4.1.  The OVPN
server is on  192.168.4.34. I set up the routing on the hardware like
this:

route add -net 192.168.6.0 netmask 255.255.255.0 gw 192.168.4.34

Something is not working with that route.  If I get on another VM that
is on the .4 network and do a traceroute to 192.168.6.1, I get the
following.  It should show a hop to 192.168.4.34 but it does not.

traceroute to 192.168.6.1 (192.168.6.1), 30 hops max, 60 byte packets
 1  192.168.4.1 (192.168.4.1)  0.162 ms  0.080 ms  0.076 ms
 2  192.168.6.1 (192.168.6.1)  0.499 ms !X  0.223 ms !X  0.134 ms !X

What am I missing?  The hardware host is misconfigured in some way and
I am having difficulty determining where.  CentOS 7 runs on all hosts
and VM's.

Thanks!
-JK


More information about the colug-432 mailing list