Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Good day! I need to configure openvpn on server with one IP (213.11.23.155, vpn.example.com) for multiple networks, for example:

Network 1 computers:

125.16.1.1

125.16.1.2

Network 2 computers:

125.16.2.1

125.16.2.2

125.16.2.3

etc...

I need an advice on how to do that.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Indeed you will want to start OpenVPN will multiple configs which reside in /etc/openvpn. Please take note that you'll need to make sure that port #### will have to have a different value for each configuration and that you'll be using, as well as those ports opened up on your firewall.

Also, please note that the 125.16/16 subnet is not allocated for personal use. If you use that space in your configuration it will interfere with connectivity to those actual machines. For internal network purposes you'll want to use the subnets listed here:

10.0.0.0    10.255.255.255  (10/8 prefix)
172.16.0.0  172.31.255.255  (172.16/12 prefix)
192.168.0.0 192.168.255.255 (192.168/16 prefix)

Simple config modifications would be as follows:

Config 1:

port 1194
server 10.20.30.0 255.255.255.0

Config 2:

port 1195
server 10.20.40.0 255.255.255.0
share|improve this answer

You can start openvpn with 2 config files (by default it starts all the config files in the /etc/openvpn directory) so you will have 2 vpn and you configure each one with a different subnet.

share|improve this answer

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.