Report this

What is the reason for this report?

VPN connection as a service on Debian

Posted on January 25, 2022

Connected Tutorial(This question is a follow-up to this tutorial):

How to Set Up an IKEv2 VPN Server with StrongSwan on Ubuntu 20.04

Hi. Could you advice me how to set up created connection as a service running from startup on latest Debian system ? regards W.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

To setup an IKEv2 VPN Server with StrongSwan on Ubuntu 20.04, you can follow these general steps:

  1. Update your package manager’s cache.
  2. Install the StrongSwan software.
  3. Create the certificates required for the VPN.
  4. Edit the StrongSwan configuration files.
  5. Configure your firewall to allow VPN traffic.
  6. Start StrongSwan.

To have StrongSwan start at boot, you can use the systemd service. Debian-based systems like Ubuntu should have this installed by default. If StrongSwan was installed through the package manager, the service is likely already set to start at boot. You can check this with the command:

  1. systemctl is-enabled strongswan

If it isn’t enabled, you can enable it with:

  1. systemctl enable strongswan

If you need a step-by-step tutorial, consider this How to Set Up an IKEv2 VPN Server with StrongSwan on Ubuntu 22.04 tutorial from DigitalOcean community tutorials.

Specifically for a Debian-based system like Ubuntu, there may be differences, but that tutorial should give you a good baseline.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.