May 2nd, 2012, 11:07 AM #1
- Join Date
- May 2012
Unable to access computers on LAN via OpenVPN Routing
I am new to OpenVPN and Networking and so am having a lot of trouble trying to access computers on LAN via OpenVPN Server. Can some one help me? Here's my scenario. I have 3 computers, Ubuntu server, CentOS server and a windows 7 laptop connected to my Cisco Valet Router. Open VPN server is installed on Ubuntu and Open VPN client is on my windows laptop and I am able to connect to the Ubuntu machine via OpenVPN without any problem. My problem arises when I try to connect to CentOS from my windows laptop. I just can't connect to it at all via Open VPN.
ubuntu and Centos have static IP addresses while windows laptop is DHCP.
CentOS IP address is 192.168.1.20 and Mask is 255.255.255.0 (ifconfig result on eth0).
Ubuntu VPN server's IP is 192.168.1.21 and Mask is 255.255.255.0 (ifconfig result on eth0).
Ubuntu VPN server Tunnel IP is 10.8.0.1.
My router's Gateway is 192.168.1.1 and subnet mask is 255.255.255.0.
here's what I have tried.
1. setting static route on my router (Cisco valet), by adding the following credentials to the static route section of my router.
Route Name: VPN
Destination IP: 192.168.1.20 (CentOS IP)
Subnetmask 255.255.255.0 (subnet mask of CentOS)
Gateway 192.168.1.1 (Gateway of router)
interface: LAN/Wireless. I get Invalid static route Error with this setup.
2. IP forwarding on my Ubuntu VPN server by editing the /etc/sysctl.conf file and setting net.ipv4.ip_forward = 1 and then executing the command sysctl -p.
3. Then I created the directory ccd under /etc/openvpn.
4. Then I went to the ccd directory (cd /etc/openvpn/ccd) and added the client file, abc1234 (abc1234.key is the name of my certificate file on my laptop client) with the following content:
iroute 192.168.0.0 255.255.255.0
ifconfig-push 10.8.0.4 10.8.0.16 (I put 10.8.04 because thats what I saw in
ipp.txt anaginst abc1234 and 10.8.0.16 is
arbitrary. I think this a possible IP range
of the tunnel? am I correct?)
I have forwarded my Ubuntu VPN server ports on my router. However, I have NOT forwarded any of the CentOS ports. I am attaching my openvpn server.conf and client.conf configuration. Can some one help me? (Why am I getting invalid static route error?)
key server.key # This file should be kept secret
server 10.8.0.0 255.255.255.0
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
;push "route 192.168.10.0 255.255.255.0"
;push "route 192.168.20.0 255.255.255.0"
push "route 192.168.1.20 255.255.255.0"
;route 192.168.40.128 255.255.255.248
route 192.168.0.0 255.255.255.248
;route 10.9.0.0 255.255.255.252
# ifconfig-push 10.9.0.1 10.9.0.2
;push "redirect-gateway def1 bypass-dhcp"
;push "dhcp-option DNS 126.96.36.199"
;push "dhcp-option DNS 188.8.131.52"
keepalive 10 120
;tls-auth ta.key 0 # This file is secret
;cipher BF-CBC # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES
remote ABC123.dyndns.org 1194
;remote my-server-2 1194
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
;tls-auth ta.key 1
Last edited by testmiss123; May 2nd, 2012 at 11:11 AM. Reason: Missalignment of Code - Creates confusion
May 2nd, 2012, 12:13 PM #2
- Join Date
- Oct 2001
- Blog Entries
This is an old thread I made up about Openvpn, check it out
HOWTO: Openvpn and Ubuntu (Dapper)
Ill check back on your post later in the day when I get back to my desk
May 5th, 2012, 04:05 PM #3
- Join Date
- May 2012
Thanks For your help on this. I have managed solve my problem.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By NewtownGal in forum Linux and UnixReplies: 1Last Post: March 29th, 2009, 08:58 AM
By MarLow in forum Networking and InternetReplies: 1Last Post: February 2nd, 2009, 10:00 AM
By boupartac in forum Networking and InternetReplies: 11Last Post: December 10th, 2008, 03:42 PM
By Carl-cox- in forum Networking and InternetReplies: 0Last Post: April 8th, 2007, 06:04 AM
By nochay in forum Networking and InternetReplies: 3Last Post: May 19th, 2003, 11:04 AM