[CentOS] IP forwarding and OpenVPN

Thu Nov 4 15:38:44 UTC 2010
Bart Schaefer <barton.schaefer at gmail.com>

On Thu, Nov 4, 2010 at 8:14 AM, Les Mikesell <lesmikesell at gmail.com> wrote:
> On 11/4/2010 9:50 AM, Bart Schaefer wrote:
>> Hrm.  When I try to add such a route on one of the machines I want to
>> reach, I get "SIOCADDRT: Network is unreachable".
> That means you don't already have a direct route to the IP you specified
> as the gateway address.  You should have used the IP of the remote
> tunnel interface endpoint

Yup, that's what I did use.  I tried first the "P-t-P" IP and then the
"ip addr" as read from the output of "ifconfig tun0", with the same
results in both cases.  On the remote machine, the route to the VPN
IPs goes through the default gateway on the remote side, which is  Multiple layers of foolishness here.

>> Maybe the simplest thing is to change the question:  How can I cause
>> packets forwarded from my LAN to avoid the VPN and go out via the
>> regular default route?
> Packets go to the most specific route - so anything not specified in a
> route statement or connected directly will go to the default gateway.

Understood.  The problem is that I want to split the route based on
the source rather than the destination, for which I presume I need
iptables rules.

At this point I think I should just thank everyone for their help and
attempt to pester the administrator of the VPN server.