• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 598
  • Last Modified:

OpenVPN configuration

Hello experts,

I have setup OpenVPN on a Windows Server 2008 R2 and on a Windows XP client.

Here is the server.ovpn config file:


port 61099
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
client-to-client
comp-lzo
max-clients 100
persist-key
persist-tun
status openvpn-status.log
verb 3

Here is the client.ovpn config file:


client
dev tun
proto tcp
remote xxx.xxx.xxx.xxx 61099    ; xxx is the remote server address
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
verb 3
verb 4
mute 5
tun-mtu 1500
route-method exe
route-delay 2
redirect-gateway def1
comp-lzo yes
mssfix 1390

Client is connecting successfully to the server, and here is the client routing table after connection:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0        128.0.0.0         10.8.0.5        10.8.0.6       1
          0.0.0.0          0.0.0.0    192.168.90.51   192.168.90.66       10
         10.8.0.0    255.255.255.0         10.8.0.5        10.8.0.6       1
         10.8.0.4  255.255.255.252         10.8.0.6        10.8.0.6       30
         10.8.0.6  255.255.255.255        127.0.0.1       127.0.0.1       30
   10.255.255.255  255.255.255.255         10.8.0.6        10.8.0.6       30
   91.140.177.205  255.255.255.255    192.168.90.51   192.168.90.66       1
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
        128.0.0.0        128.0.0.0         10.8.0.5        10.8.0.6       1
      169.254.0.0      255.255.0.0    192.168.90.66   192.168.90.66       20
     192.168.90.0    255.255.255.0    192.168.90.66   192.168.90.66       10
    192.168.90.66  255.255.255.255        127.0.0.1       127.0.0.1       10
   192.168.90.255  255.255.255.255    192.168.90.66   192.168.90.66       10
        224.0.0.0        240.0.0.0         10.8.0.6        10.8.0.6       30
        224.0.0.0        240.0.0.0    192.168.90.66   192.168.90.66       10
  255.255.255.255  255.255.255.255         10.8.0.6               2       1
  255.255.255.255  255.255.255.255         10.8.0.6        10.8.0.6       1
  255.255.255.255  255.255.255.255         10.8.0.6           40004       1
  255.255.255.255  255.255.255.255    192.168.90.66   192.168.90.66       1
Default Gateway:          10.8.0.5
===========================================================================
Persistent Routes:
  None

Here is the server routing table:


IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     192.168.1.10     192.168.1.53    266
         10.8.0.0    255.255.255.0         10.8.0.2         10.8.0.1     30
         10.8.0.0  255.255.255.252         On-link          10.8.0.1    286
         10.8.0.1  255.255.255.255         On-link          10.8.0.1    286
         10.8.0.3  255.255.255.255         On-link          10.8.0.1    286
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      192.168.1.0    255.255.255.0         On-link      192.168.1.53    266
     192.168.1.53  255.255.255.255         On-link      192.168.1.53    266
    192.168.1.255  255.255.255.255         On-link      192.168.1.53    266
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link      192.168.1.53    266
        224.0.0.0        240.0.0.0         On-link          10.8.0.1    286
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link      192.168.1.53    266
  255.255.255.255  255.255.255.255         On-link          10.8.0.1    286
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0     192.168.1.10  Default
===========================================================================

The problem is that client is unable to ping ping any remote address like 192.168.1.53. Only ping 10.8.0.1 replies.

Any help?
0
Muhajreen
Asked:
Muhajreen
  • 2
2 Solutions
 
twohawksCommented:
Almost there.  I think the next step is to setup the scope.

Have a look here...
http://openvpn.net/index.php/open-source/documentation/howto.html#scope
0
 
MuhajreenAuthor Commented:
Thank you.

Would you please clarify in more details what shall I do? The provided article above has many steps which I couldn't understand.
0
 
QlemoC++ DeveloperCommented:
You will need to either set up the route to 192.168.1.0 on your client, or push it with the server config (preferred). Insert into the server config file:
    push "route 192.168.1.0 255.255.255.0"
As soon as any client connects, and successfully authenticates, the server will "push" the additional route to the client, filling in the proper gateway address (which is on the OpenVPN network).
0
 
twohawksCommented:
Thank you, Muhajreen. Hope its worked out smoothly for you.
0

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now