Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a SMB client where I need to install a VPN solution. I have one CentOS server that has 3 network connections , one is an Internet connection that comes from a router. It has 10.x.x.x address (NATed by the router), the second connection is to 192.168.3.x and the third one is 192.168.4.x, I want that workers of the SMB could connect to the server from the Internet when they at the road, and could access their network resources as if they are at the office computers.

The VPN server (that is the Centos machine) is supposed to get all the VPN traffic through the firewall.

I would try to make the questions as general as I can :

  1. What should be the IP address of the clients? (we aren't using DHCP on the network).
  2. How can I make the server/client decide to which network it should be part of based on IP ? (I mean with 4.x or 3.x).
  3. Is it better to put the VPN solution on the router end although the router doesn't have the power of the server machine (I know that VPN involves encryption & decryption)?

I would like to get a rough outline of the configuration needed to be in place, either on the clients & the server.

As you can see from the title I am planing to use OpenVPN.

Update:

To clarify the question, i am want that workers of the Small business could connect to their home network over the Internet and access the resources of the network when they are anywhere at the world.

share|improve this question
2  
To answer this you need to edit your question to make it clear: Why are there two network 192.168.3.x and 192.168.4.x? What are their purpose? Are they at the SMB site or where your server is? Do you plan on setting up a site-to-site VPN or do you just want to slap an OpenVPN client onto each workstation at the SMB? –  Per von Zweigbergk Nov 27 '11 at 19:17
    
@PervonZweigbergk I have changed a little bit the question, since i think that it doesn't matter why i have two networks, and what their purpose, the goal of the question is to configure it for what is it. Thanks. –  Hanan N. Nov 28 '11 at 20:47
    
Well, without knowing why you have two different networks, it's impossible to answer question 2. –  Per von Zweigbergk Nov 29 '11 at 3:30
add comment

1 Answer

up vote 0 down vote accepted

so after 3 whole evenings i have manged to install and configure it properly on a test environment, so here i could post some hints and tips from me findings and hopefully answer my questions.

The first thing you should do, is to get a sample configuration file for your server/client OpenVPN solution, it would make your life way easier. you can get this files at a Linux machine from here /usr/share/doc/openvpn/sample-config-files/ (if you have problems to find it just do find / -name client.conf) and copy them to /etc/openvpn/, then follow the great guide from the OpenVPN site, it requires just 3 changes to the sample file and you are good to go.

To answer my questions:

  1. The OpenVPN server basically create a Network of itself that it isn't part of the current networks that it connected with, so you client get a IP address from that network automatically by the OpenVPM server, and in order for your client to have connection with the others networks that are connected with the OpenVPN server you add in the configuration file of the server this line push "route 192.168.3.0 255.255.255.0" for each network you want the client to communicate with , so that when your client connect to the server it get it's route table updated by the server and will be able to communicate with the machines at the specified network.

  2. see answer 1.

  3. I have tested it with a simple DD-WRT router with OpenVPN server capabilities, but it seems a slow when you have more than 3 users, so it is better to get

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.