Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Openvpn 2 servers
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Openvpn 2 servers

Hi,
Is it possible on 1 vps (kvm) have under
etc/openvpn
2 servers?
One like server1.conf with tun0 and other server2.conf with tun1.

Than when I want to add users, when I
source vars
which server will openvpn get?

Do I need to pay attention to any thing that I'm missing?

Comments

  • NyrNyr Community Contributor, Veteran

    Yes, you can run multiple instances. You will need two different internal subnets.

    Certificates will be valid for both instances except if you specify/create two different CAs.

    Thanked by 1plopes
  • For the second instance You also need to either a non-standard port on the same IP, an extra IP, or to run one tcp instance and one udp instance on the same IP and port...

    Thanked by 1plopes
  • I was thinking only to change only tun0 to tun1 and port from 1194 to 1195...

  • That will do it, I've run OpenVPN on a lot of different ports and very rarely found myself somewhere that I could use 1194 but not 1195.

    If you're not using the server as a web server too, a nice trick is to set up a 3rd (or 4th..) openvpn instance on TCP port 443 - if the standard ports are blocked, this often gets you out of a jam.

    Thanked by 1plopes
  • AbdussamadAbdussamad Member
    edited November 2015

    You don't need to run multiple instances of openvpn if you just want openvpn to listen to multiple ports. You only need multiple instances for different protocols i.e. UDP and TCP. If all you need is UDP then one openvpn instance will suffice. Just redirect traffic from multiple ports to that instance:

    http://richardfergie.com/redirect-port-80-to-a-different-port-using-iptables

    tehdan said: If you're not using the server as a web server too, a nice trick is to set up a 3rd (or 4th..) openvpn instance on TCP port 443

    You can also use port 587 which is used for SSL traffic to email servers. This way you can still run a web server on 443

    Thanked by 1plopes
Sign In or Register to comment.