I though I had resolved my problem accessing machines behind my OpenVPN server (server-side LAN) but was mistaken. I would apprciate any help in resolving this. I've been working on this for almost two weeks now with little success.
I am confused by the route tables use of 10.8.0.2 (my client does the same thing, but uses 10.8.0.5), but its generated by OpenVPN when it starts as those entries are not present when I stop the service.
Setup
Work LAN: 192.168.75.0
Home Lan: 192.168.0.0
Routed Tunnel
OpenVPN Server - Work LAN - Linux Mint 13 Box - VPN: 10.8.0.1 / LAN: 192.168.75.30 (SELinux not enabled - important?)
OpenVPN Client - Home LAN - Win XP - VPN: 10.8.0.6 / LAN: 192.168.0.104
Router is a seperate device - DLink615
- routed DestIP:10.8.0.0 NetMask:255.255.255.0 gateway:192.168.75.30 Metric:1
- routed DestIP:192.168.0.0 NetMask:255.255.255.0 gateway:10.8.0.1 Metric:1
- Client and Server can ping each other on 10.8.0.0
- Client can ping Server @ 192.168.75.30
- Win7 PC on Server LAN can not ping OpenVPN VPN (10.8.0.1)
-
server.conf
local 192.168.75.30
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.75.0 255.255.255.0"
keepalive 10 120
comp-lzo
max-clients 1
persist-key
persist-tun
status openvpn-status.log
verb 3
route output
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.75.1 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0
link-local * 255.255.0.0 U 1000 0 0 eth0
192.168.0.0 10.8.0.1 255.255.255.0 UG 0 0 0 tun0
192.168.75.0 * 255.255.255.0 U 1 0 0 eth0
iptables -L -t nat -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
cat /proc/sys/net/ipv4/ip_forward
1
ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:d4:21:da:f5
inet addr:192.168.75.30 Bcast:192.168.75.255 Mask:255.255.255.0
inet6 addr: fe80::213:d4ff:fe21:daf5/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:113944 errors:0 dropped:0 overruns:0 frame:0
TX packets:22219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26749252 (26.7 MB) TX bytes:2776773 (2.7 MB)
Interrupt:23 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:964 errors:0 dropped:0 overruns:0 frame:0
TX packets:964 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:157436 (157.4 KB) TX bytes:157436 (157.4 KB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:43920 (43.9 KB)
EDIT1: I mistakenly flushed the iptables before posting them. I will add how it was setup prior.
EDIT2: Add client.opvn - HOME (this has been used on a Win XP and Win7)
client
dev tun
proto udp
remote xxx.xxx.xxx.xxx 1194 #xxx - public ip of gateway at office
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3