I'll apologise in advance for possibly getting the WHOLE concept of OpenVPN wrong. If anyone has the patience to read this plea for help and can push me in the right direction I'll be eternally grateful . I'm only trying to configure it to use a remote VoIP phone. I'm quite content with usual PPTP client to site VPN setup I have that already works for normal remote access.
I fully intend to do more reading up on OpenVPN but it'll take me a while to fully understand it so this post is a plea for some direct help to get up and running cutting corners for learning. Naughty I know but I only want to test the setup to see if it's feasible. I've already got it installed and connecting, just have no ping ability to the remote network.
I'll be honest, I'm a bit of a noob when it comes to VPNs, I've never had to delve into the config for them much as from a router to router point of view, they just work. But I am a part-time Sys Admin so I can feel my way around a network and linux but I'm having all sorts of trouble understanding how a client connects to a remote network via OpenVPN server and has access to the network resources the server is connected to.
I used this tutorial:
https://safesrv.net/install-openvpn-on-centos/
And installed and configured OpenVPN on a VirtualBox Centos 6 image with bridged networking enabled instead of NAT, so from a config point of view it should be like a standalone machine. Virtual Box is installed on a Windows XP desktop computer connected within the network I want the phone to connect and is being used to learn and get the initial test setup working before I set it all up again on dedicated hardware and bare metal OS.
I want to connect a VoIP telephone (Yealink T26) remotely from my home to my work network as the phone has an OpenVPN client built in. But before I do that I need to get a simple Windows XP PC connected remotely first to test the connection. This is where the problem lies.
My home network is 192.168.0.1 (Router) and then the machine I'm using as client is 192.168.0.5.
The work router has a static public IP address and the firewall has ports forwarding for 1194 UDP to the CentOS OpenVPN machine along with 22 for SSH. The work network is 192.168.0.130 (OpenVPN Server) with 192.168.0.254 as the gateway and DNS.
So now I have no idea what to set up in OpenVPN config to allow the client at home to have access to the work network, or specifically the VoIP server (192.168.0.140). I have downloaded the server.cfg and ca.cert to the client and the client CAN LOG IN SUCCESSFULLY to the remote OpenVPN server and connects and has a timer to say how long it's been connected. However, using the settings that came with the tutorial above I don't have access to the work network resources from home. I can't ping any machines on the remote network at all.
When OpenVPN client connects it gives the client a remote IP address of 10.8.0.6 or something else near this IP address.
I assume that the 10.8.0.0 range is bridged to the network local to the OpenVPN server somehow and this is probably why my config falls apart.
Should I change my home network range from 192.168.0.1-254 to 192.168.1.0-254 to prevent confusion as a first step so they don't use the same range?
Then should I keep the 10.8.0.0 number given to the client (can I even change this?) but sort the bridging out or have I completely got the whole idea wrong?
I've stopped the IPTables service until I get it all this working then plan to configure and re-enable it.
I think I'm going wrong because I'm in other general VPN mode in my mind. Whenever I VPN remotely via the router remote user log in I use PPTP with username and password and give the remote user an ip address on the local network and that works flawlessly. It looks like OpenVPN doesn't use this simplistic approach and uses some virtual IP range bridged.
I'm sure this is one of the simplest ways to make use of OpenVPN and is the way 90% of people want to connect to OpenVPN but the 90% probably aren't having problems understanding the concept or getting connectivity to work as most posts on forums seem to for more complex set ups.
Any help would be appreciated or pointing in the direction of a tutorial that does just what I want with a bit of an explanation and theory behind it.
Again, apologies for being so long-winded but I had to get my point across.
Cheers
J