Problem: I've set up a working OpenVPN server on a headless Ubuntu 12.04 box, a D-LINK DIR 655 router w/ factory firmware, and am able to connect to it from anywhere using my mac laptop and tunnelblick. When I connect in, I'm assigned an IP address of 10.8.0.x, the server is 10.8.0.1, so I have no problems SSHing into it. Once SSHd in, I can even ping other machines (obviously) on my home network (192.168.1.x).
Desired outcome: What I want, is, to connect to the VPN server, and instead of getting a 10.8.0.x address, I get a 192.168.1.x on my home network.
I can't figure out how to talk to the OTHER machines on my home network WITHOUT being SSHd in to the VPN server. I'd like to just connect to my VPN server, then be a part of my home network.
Attempted solutions: I've read that I need to set up routes, and/or enable IP forwarding. I enabled IP forwarding using
sudo sysctl -w net.ipv4.ip_forward=1 and that doesn't seem to have done anything. I've also uncommented a line in the OpenVPN's server.conf file:
# Push routes to the client to allow it # to reach other private subnets behind # the server. Remember that these # private subnets will also need # to know to route the OpenVPN client # address pool (10.8.0.0/255.255.255.0) # back to the OpenVPN server. push "route 192.168.1.0 255.255.255.0" ;push "route 192.168.20.0 255.255.255.0"
But still no luck, I still get a 10.8.0.x address...
My routing table (unaltered):
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.0.1 0.0.0.0 UG 100 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 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
I'm not really sure of the nomenclature or specific terms I should be searching for when trying to solve this problem, as I haven't seen a clear howto in simple terms as of yet, and I'm sure this looks like I just need things spelled out for me.
Any help is appreciated, thanks!