0

I have been using openvpn for a while, on an obscure port ( example, 43012). I've been noticing on my laptop (client) that whenever the vpn is connected, openvpn is listening on port 1194, which I do not use. I once had an ubuntu computer that got infected with a trogran that would create a PPTP vpn to easedrop on my traffic, so if I seem paranoid that's why.

Output of netstat -taupen | grep openvpn

anon@linuxpc:~$ sudo netstat -taupen | grep openvpn
tcp        0      0 127.0.0.1:1194          0.0.0.0:*               LISTEN      0          533708      10034/openvpn   
tcp        0      0 127.0.0.1:60854         127.0.0.1:1194          ESTABLISHED 0          533714      10031/nm-openvpn-se
tcp        0      0 127.0.0.1:1194          127.0.0.1:60854         ESTABLISHED 0          533715      10034/openvpn   
udp        0      0 0.0.0.0:51018           0.0.0.0:*                           0          533709      10034/openvpn   

So, I'm wondering if this is normal, does openvpn-client use local port forwarding to the standard 1194 port?

3 Answers 3

1

OpenVPN will bind to port 1194 by default, even when running as a client, but you can disable this behaviour with the "nobind" option. Simply add that keyword to your configuration file and it will no longer hog the port needlessly.

I would recommend adding nobind to all client configs, since it also avoids potential problems with multihomed / multipathed servers.

1
  • Thank you, at least someone correctly described why this happens. I will add that after I specified the nobind parameter - my OpenVPN client still continued to listen to the port, but it was no longer 1194, but arbitrary.
    – МАН69К
    Jun 1, 2022 at 11:28
0

It says Here that the sample server configuration file is an ideal starting point for an OpenVPN server configuration. It will create a VPN using a virtual TUN network interface (for routing), will listen for client connections on UDP port 1194 (OpenVPN's official port number), and distribute virtual addresses to connecting clients from the 10.8.0.0/24 subnet.

1
  • Yes, but I'm asking about a connected client, not the server. The server is listening on a custom port. I'm wondering if it is normal for my laptop (the client), when connected to my server, to utilize port 1194, because the server is not using that port.
    – darker.ego
    Aug 6, 2014 at 17:53
0

It looks like you have the vpn set up through network-manager and that may be the problem.

I connect through the command line and do not have this issue.

Also, check the .ovpn file. You can open it with gedit, nano, or any other text editor and read the configuration and see everything there the way it is set up.

Connect to openvpn through the commandline and see if the issue still exists, here's how. Just run the following command in an open terminal to connect to the vpn substituting the actual .ovpn file.

sudo openvpn --config openvpnfile.ovpn

You can drag and drop or provide the path to the actual .ovpn openvpnfile in the command.

Leave the terminal open when using the vpn; close the terminal to disconnect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .