Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The OpenVPN cookbook shows an example for site-to-site VPN (3 sites). They configured each tunnel on a unique port:

  1. site A to site B: 1194
  2. site A to site C: 1195
  3. site B to site C: 1196

The author does not give any information about it. I didn't find anything useful in the man pages.
Is this a rule? Should we assign a unique port for every single point to point tunnel?

share|improve this question
up vote 5 down vote accepted

You would have to have them on unique ports. You can't have two applications listening simultaneously on a single port. So, in your example, because tunnels 1 and 2 both have an end on Site A, those endpoints must have unique ports. Hence the use of ports 1194, and 1195.

Now, because the VPN links 1 and 2 are using unique ports 1194 and 1195 on A->B, and A->C, the link between B->C can't use either of those ports, so the author chose 1196.

The port numbers used are arbirtrary, excluding assigned ports (1-1024), so the ports could be any 3 ports.

But, yes, the ports must be unique, at a minimum for each end-point at each site.

share|improve this answer

Your Answer


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.