Hi,
I am trying to setup OpenVPN where from the Server I can ping the IP's on the Client side LAN and the IP's on the client side can ping the server through the OpenVPN tunnel. My ultimate goal it to connect an Mikrotik Router via Cellular modem to the VPS server using OpenVPN, hence the protocol is tcp(Mikrotik only supports tcp) and the port is 443(Cellular providers block strange ports, hence 443). Anyway, I though I would first try to get my RaspberryPI to connect to the VPS server and see if I can accomplish this using two Linux devices.
I have the following setup: Private LAN(192.168.88.0/24) - Raspi(OpenVPN Client) - Router(Public IP) - Internet - (Public IP)VPS Server
My the VPS Server is the OpenVPN server(10.8.0.1) and my Raspi is the OpenVPN Client(10.8.0.5). I can ping the OpenVPN IP's from the different devices, so the Raspi OpenVPN IP can ping the VPS OpenVPN IP and vica verse, but I can't ping the from the VPS to the Private LAN, nor from the Private Lan can I ping the VPS. On the VPS I have tried adding static routes to the Private LAN via the OpenVPN IP, but nothing. I unloaded iptables on the VPS and the Raspi, also the Raspi is set to allow IPv4 forwarding.
I really do not know what I am missing to get this working.
My setup is as follows:
OpenVPN Server - VPS Server running CentOS 6.4 with openvpn-2.2.2-1.el6.rf.x86_64
server.conf
port 443
proto tcp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
ifconfig-pool-linear
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher AES-256-CBC
persist-key
persist-tun
status /var/log/openvpn/vpngate-status.log
verb 4
client-to-client
client-config-dir ccd
route 192.168.1.0 255.255.255.0
ccd/raspi
iroute 192.168.1.0 255.255.255.0
push "route 10.8.0.0 255.255.255.0 10.8.0.5"
OpenVPN Client - RaspberryPI running Arch, openvpn 2.3.0-2
client.conf
client
dev tun
proto tcp
remote vpn_server 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/raspi.crt
key /etc/openvpn/raspi.key
ns-cert-type server
cipher AES-256-CBC
verb 4
On OpenVPN Server: ip r s
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
x.x.x.x/25 dev eth0 proto kernel scope link src x.x.x.x
10.8.0.0/24 via 10.8.0.2 dev tun0
192.168.1.0/24 via 10.8.0.2 dev tun0
y.y.y.y/16 dev eth0 scope link metric 1002
default via x.x.x.x dev eth0
On OpenVPN Client: ip r s
default via 192.168.1.1 dev eth0 metric 204
10.8.0.0/24 via 10.8.0.1 dev tun0
10.8.0.1 dev tun0 proto kernel scope link src 10.8.0.5
10.8.0.1 dev tun1 proto kernel scope link src 10.8.0.5
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.10 metric 204
I apologize for the extremely long post, but I would rather you have all the information in order to assist me.
Regards
Gregg