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 11.10 server, CentOS 6.2 server and a windows 7 laptop connected to my Cisco Valet Router. I have installed Open VPN server on the Ubuntu machine and Open VPN client on my windows laptop and I am able to connect to the Ubuntu machine via OpenVPN without any issue. My problem arises when I try to connect to the CentOS machine via my Open VPN client on Windows 7. I just can't connect to it at all via Open VPN. Both CentOS and Ubuntu have static IP addresses while Windows 7 is DHCP. My CentOS IP address is 192.168.1.20 (ifconfig result) while my Ubuntu VPN server's IP is 192.168.1.21 (ifconfig result). The Ubuntu VPN server Tunnel IP is 10.8.0.1. Mask is 255.255.255.0 (ifconfig result) on both computers. My router's Gateway is 192.168.1.1 and subnet mask is 255.255.255.0. I tried to add static route on my router by giving Route Name: VPN, Destination IP: 192.168.1.20, Subnetmask 255.255.255.0, Gateway 192.168.1.1 and interface: LAN/Wireless, but I get Invalid static route Error. What am I doing wrong? Please help!!!
Here's my server.conf file
Code: Select all
# Which local IP address should OpenVPN
# listen on? (optional)
;local a.b.c.d
port 1194
# TCP or UDP server?
;proto tcp
proto udp
;dev tap
dev tun
;dev-node MyTap
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
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
;server-bridge
;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"
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
route 192.168.0.0 255.255.255.248
client-config-dir ccd
;route 10.9.0.0 255.255.255.252
# Then add this line to ccd/Thelonious:
# ifconfig-push 10.9.0.1 10.9.0.2
;learn-address ./script
;push "redirect-gateway def1 bypass-dhcp"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
;client-to-client
;duplicate-cn
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
comp-lzo
;max-clients 100
;user nobody
;group nogroup
persist-key
persist-tun
status openvpn-status.log
;log openvpn.log
;log-append openvpn.log
verb 3
;mute 20
Code: Select all
client
;dev tap
dev tun
;dev-node MyTap
;proto tcp
proto udp
remote ABC123.dyndns.org 1194
;remote my-server-2 1194
;remote-random
resolv-retry infinite
nobind
;user nobody
;group nogroup
persist-key
persist-tun
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
;mute-replay-warnings
ca ca.crt
cert abc1234.crt
key abc1234.key
ns-cert-type server
;tls-auth ta.key 1
;cipher x
comp-lzo
# Set log file verbosity.
verb 3
# Silence repeating messages
;mute 20