Which outbound ports OpenVPN client relies on?
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Oct 28, 2020 11:27 am
Which outbound ports OpenVPN client relies on?
Hello!
I know from experience that OpenVPN clients in foreign networks do not require any inbound port to be open.
But what about outbound ports (e.g. in some cases of very strict security policies where outbound ports might be closed) ?
My experiments showed that OpenVPN client's connection work until all outbound ports are open, but as soon I close them (leaving three of them open: 1194, 443 and 2002-it is my default one), OpenVPN does not work then.
Which outbound ports have to be open by the clients ?
Many thanks in advance!!
I know from experience that OpenVPN clients in foreign networks do not require any inbound port to be open.
But what about outbound ports (e.g. in some cases of very strict security policies where outbound ports might be closed) ?
My experiments showed that OpenVPN client's connection work until all outbound ports are open, but as soon I close them (leaving three of them open: 1194, 443 and 2002-it is my default one), OpenVPN does not work then.
Which outbound ports have to be open by the clients ?
Many thanks in advance!!
- openvpn_inc
- OpenVPN Inc.
- Posts: 1332
- Joined: Tue Feb 16, 2021 10:41 am
Re: Which outbound ports OpenVPN client relies on?
Hi Josko,
The answer to that depends what port(s) the server is using. OpenVPN Access Server, for example, can accept client connections on either TCP port 443 or UDP port 1194.
Perhaps what you are missing is a rule to accept the replies from the server?
regards, rob0
The answer to that depends what port(s) the server is using. OpenVPN Access Server, for example, can accept client connections on either TCP port 443 or UDP port 1194.
Perhaps what you are missing is a rule to accept the replies from the server?
regards, rob0

Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Oct 28, 2020 11:27 am
Re: Which outbound ports OpenVPN client relies on?
Thanks for reply!
My server (inside the Server.ovpn file) is configured to listen on port 2002.
As I said above: I tried at client to leave these 3 outbound ports 1194, 443 and 2002 open, but seems some other is being used?
My server (inside the Server.ovpn file) is configured to listen on port 2002.
As I said above: I tried at client to leave these 3 outbound ports 1194, 443 and 2002 open, but seems some other is being used?
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Oct 28, 2020 11:27 am
Re: Which outbound ports OpenVPN client relies on?
Could anybody help please?
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Oct 28, 2020 11:27 am
Re: Which outbound ports OpenVPN client relies on?
Rule for accepting replies from the server: are they accepted through clients' outbound ports: TCP443, UDP1194 and UDP2002 ? Or something else needs to be opened at the client?
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Which outbound ports OpenVPN client relies on?
Search for ephemeral ports..
And learn about networking.
And learn about networking.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Oct 28, 2020 11:27 am
Re: Which outbound ports OpenVPN client relies on?
Thanks for reply!
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Oct 28, 2020 11:27 am
Re: Which outbound ports OpenVPN client relies on?
Hello!
I have run command and found out that OpenVPN process uses some strange port (usually between 49 and 55 K), I guess it is "ephemeral port" previous guy has mentioned, the question is now how to make that port fixed so I can make an outgoing port-based rule (in cases when firewall blocks outgoing traffic ) ?
Because port number seems to change after every reboot.
BTW. OpenVPN server listens on port 2002 (no mention of this port under Netstat, what confused me as well).
Netstat's output:
https://ibb.co/rHLNqqg
I have run
Code: Select all
sudo netstat -tunlp
Because port number seems to change after every reboot.
BTW. OpenVPN server listens on port 2002 (no mention of this port under Netstat, what confused me as well).
Netstat's output:
https://ibb.co/rHLNqqg