Skip to content

Conversation

valerio-bozzolan
Copy link

@valerio-bozzolan valerio-bozzolan commented Jun 15, 2025

Description

Fix all the small issues described in #216 for OpenVPN in Ubuntu 24.04. In order of importance:

  • Fix un-existing server.conf.gz
  • Fix guide in Docker: tune dpkg to recover the examples under /usr/share/doc/openvpn
  • Fix missing TLS Auth on the server
  • Fix deprecated warning «DEPRECATED OPTION: The option --secret is deprecated.»
  • Add troubleshooting tip about TLS Auth to save some hours
  • Fix a typo

Related Issue


Merge Strategy

I suggest to do not squash the commits, since each commit has meaningful details for the benefit of future 'git blame'. Therefore I suggest to merge as fast-forward (or merge commit). You're welcome! 👍 lol


Checklist

Copy link
Contributor

@panlinux panlinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this! Comments in the diff, some questions, some requests for changes.

@valerio-bozzolan valerio-bozzolan force-pushed the 216-openvpn-fixes branch 4 times, most recently from 1d27094 to 0c4f719 Compare June 17, 2025 06:28
Avoid the following OpenVPN deprecation notice while generating the key:

    DEPRECATED OPTION: The option --secret is deprecated.
    WARNING: Using --genkey --secret filename is DEPRECATED.  Use --genkey secret filename instead.

In short:

    #Bad:  'sudo openvpn --genkey --secret ta.key'
    #Good: 'sudo openvpn --genkey   secret ta.key'

Ref canonical#216
If you get this error:

    TLS Error: cannot locate HMAC in incoming packet from ...

Very probably you will appreciate the added entry in the troubleshooting list.

Ref canonical#216
@valerio-bozzolan
Copy link
Author

Thanks for your round of review and enjoy the new commit history 👍

I've solved all change requests and also fixed a pending problem was just mentioned in the issue, about minimal environments like Ubuntu official Docker images.

I tried to be nice and still mention the old stuff from Ubuntu 20.04 since it's still under Expanded Security Maintenance (?) but feel free to kill that paragraph violently, if the policy is to don't mention Ubuntu 20.04 anymore. I kept that block since it costs nothing for me to keep it.

Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution! i've added an improvement idea, apart from that i think this is ready to ship 🚢

Copy link
Contributor

@panlinux panlinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update! I think the only remaining point is the server.conf/client.conf compression. If 22.04 and 24.04 are the same, then we just need one set of instructions, and don't worry about 20.04 and earlier.

> ```bash
> echo 'path-include=/usr/share/doc/openvpn/examples/*' > /etc/dpkg/dpkg.cfg.d/my-openvpn
> apt install --reinstall openvpn
> ```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right place for this information. Nowhere else in the server guide do we talk about how to tweak such minimal environments when describing a particular service. If we want to go down this route, I believe it's better to document such steps in a separate entry in the server guide, perhaps near the installation docs, or even a new one that talks about minimal images.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Could I try mentioning this in the troubleshooting section, in a line, very shortly? 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think suggesting to change your ubuntu installation just to fetch these sample config files is overkill. How about a link to fetch these from the internet? We could link directly to the package git repository. For example, those example files can be seen here: https://git.launchpad.net/ubuntu/+source/openvpn/tree/sample/sample-config-files?h=applied/ubuntu/noble-devel

We can link directly:

These are stable links guaranteed to always point at these files from the latest release of openvpn for Ubuntu Noble 24.04.

Copy link
Author

@valerio-bozzolan valerio-bozzolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Damn GitHub, I thought I'd already sent these)

> ```bash
> echo 'path-include=/usr/share/doc/openvpn/examples/*' > /etc/dpkg/dpkg.cfg.d/my-openvpn
> apt install --reinstall openvpn
> ```
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Could I try mentioning this in the troubleshooting section, in a line, very shortly? 👍

@panlinux
Copy link
Contributor

panlinux commented Jul 1, 2025

Lots of updates in this PR, nice! Taking a look!

@panlinux
Copy link
Contributor

Hi @valerio-bozzolan, are you still interested in working on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feedback]: OpenVPN guide on 24.04
3 participants