Hi folks,
I have a debian server running an Apache daemon on the eth0 interface. Now from time to time the server has to open an openvpn connection (tun0) to other networks to get some data from there. During this period the Apache is no longer reachable under it's IP address on eth0 because all outgoing traffic is routed over tun0.
I'm not that firm in routing, so what can I do, so all incoming packets are answered over the interface they came in and all outgoing traffic what is initiated by the server itself runs over tun0?
Routing table w/o openvpn connection:
root@j305934:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default sw-gate05.jiffy 0.0.0.0 UG 0 0 0 eth0
134.119.3.0 * 255.255.255.0 U 0 0 0 eth0
root@j305934:/# ip route
default via 134.119.3.254 dev eth0
134.119.3.0/24 dev eth0 proto kernel scope link src 134.119.3.16
Routing table with active openvpn connection:
root@j305934:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.200.195.1 128.0.0.0 UG 0 0 0 tun0
default 134.119.3.254 0.0.0.0 UG 0 0 0 eth0
10.200.195.0 * 255.255.255.0 U 0 0 0 tun0
62.113.251.130 134.119.3.254 255.255.255.255 UGH 0 0 0 eth0
128.0.0.0 10.200.195.1 128.0.0.0 UG 0 0 0 tun0
134.119.3.0 * 255.255.255.0 U 0 0 0 eth0
root@j305934:/# ip route
0.0.0.0/1 via 10.200.193.1 dev tun0
default via 134.119.3.254 dev eth0
10.200.193.0/24 dev tun0 proto kernel scope link src 10.200.193.43
62.113.251.130 via 134.119.3.254 dev eth0
128.0.0.0/1 via 10.200.193.1 dev tun0
134.119.3.0/24 dev eth0 proto kernel scope link src 134.119.3.16