<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://uname.pingveno.net/blog/index.php/feed/rss2/xslt" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title># uname -a - Mot-clé - openvpn</title>
    <link>https://uname.pingveno.net/blog/index.php/</link>
    <atom:link href="https://uname.pingveno.net/blog/index.php/feed/tag/openvpn/rss2" rel="self" type="application/rss+xml" />
    <description>Le blog de uname.pingveno.net</description>
    <language>fr</language>
    <pubDate>Tue, 18 Aug 2026 13:46:21 +0200</pubDate>
    <copyright>Mathieu Pellegrin</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Dotclear</generator>
          <item>
        <title>Migrate an OpenVPN configuration to Debian 8 (Jessie) with systemd</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2015/05/23/Migrate-an-OpenVPN-configuration-to-Debian-8-%28Jessie%29-with-systemd</link>
        <guid isPermaLink="false">urn:md5:a60d9b9041f53247753bbe51ac24a8c0</guid>
        <pubDate>Sat, 23 May 2015 10:32:00 +0200</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Hacks</category>
                          <category>debian</category>
                  <category>jessie</category>
                  <category>openvpn</category>
                  <category>systemd</category>
                <description>          &lt;p&gt;This article could have been avoided if the Debian documentation was up-to-date. Actually it is not, and the solution came from Fedora documentation for OpenVPN.&lt;/p&gt;

&lt;p&gt;Debian 8 uses systemd by default, and it implies several changes, in&amp;nbsp; particular the way you start/stop your services.&lt;/p&gt;

&lt;h3&gt;The main topic : systemd&lt;/h3&gt;

&lt;h4&gt;What changes&lt;/h4&gt;

&lt;ul&gt;
	&lt;li&gt;
	&lt;p&gt;A new fancy command now manage the startup : &lt;strong&gt;systemctl&lt;/strong&gt; (don't mess with the &lt;strong&gt;sysctl&lt;/strong&gt; command used for network configuration !)&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;The startup dependencies are no longer in the LSB headers in startup scripts (way too simple, boy), the dependencies are stored as symlinks in subdirectories located in &lt;strong&gt;/etc/systemd/*&lt;/strong&gt; . Note that &lt;strong&gt;/etc/systemd/&lt;/strong&gt; contains some static configuration files, and that the real services configuration files are stored in &lt;strong&gt;/lib/systemd/*&lt;/strong&gt; (this is where the symlinks from &lt;strong&gt;/etc/systemd/*&lt;/strong&gt; points to).&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Some services have been split from monolithic startup to dynamic&lt;/strong&gt;. It means that you potentially have to enable and run multiple &quot;services&quot; in order to actually start the full &quot;service&quot;. For instance, &lt;strong&gt;OpenVPN no longer runs every available configuration in /etc/openvpn/*.conf , you have to explicitely activate each *.conf file as a service in systemd !&lt;/strong&gt;&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;What doesn't change&lt;/h4&gt;

&lt;ul&gt;
	&lt;li&gt;
	&lt;p&gt;You can still start your services with &lt;strong&gt;service &lt;em&gt;servicename&lt;/em&gt; start&lt;/strong&gt;.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;The init scripts in &lt;strong&gt;/etc/init.d/*&lt;/strong&gt; still exists, and some are still usable (monolithics services).&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Run your OpenVPN configuration&lt;/h3&gt;

&lt;p&gt;While you can still use the command &lt;strong&gt;openvpn --config /etc/openvpn/yourconfigfile.conf&lt;/strong&gt;, you should do it with systemd. If your configuration file is /etc/openvpn/sample.conf, you should start your VPN connexion with &lt;strong&gt;systemctl start openvpn@sample.service&lt;/strong&gt; .&lt;/p&gt;

&lt;p&gt;Note that &lt;strong&gt;service openvpn@sample start&lt;/strong&gt; also works.&lt;/p&gt;

&lt;h3&gt;Start your VPN at boot&lt;/h3&gt;

&lt;p&gt;Again, the auto startup was too simple. You now have to enable every *.conf file at boot. Enable you newly sample.conf at startup with the command &lt;strong&gt;systemctl enable openvpn@sample.service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This actually creates a symlink in &lt;strong&gt;/etc/systemd/system/multi-user.target.wants/openvpn@sample.service&lt;/strong&gt; pointing to &lt;strong&gt;/lib/systemd/system/openvpn@.service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ok, it's simpler for dynamic loads, but who needs to dynamically enable and disable configuration at boot ? If I want a different configuration, I simply write different files in the right folder...&lt;/p&gt;

&lt;h3&gt;Meanwhile, in Debian Apache package&lt;/h3&gt;

&lt;p&gt;You can enable and disable VirtualHosts by using the /etc/apache2/sites-available/ and /etc/apache2/sites-enabled/ folders. No hidden features, no boot startup configuration, all configuration files in /etc/programname/ . Way too simple ?&lt;/p&gt;

&lt;p&gt;Hey, what if we had to configure a startup script for every VirtualHost ? Should be fun, don't you think ?&lt;/p&gt;

&lt;h3&gt;Sources&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://fedoraproject.org/wiki/Openvpn#Working_with_systemd&quot; hreflang=&quot;en&quot;&gt;OpenVPN : working with systemd [Fedora wiki]&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://fedoraproject.org/wiki/Systemd#How_do_I_start.2Fstop_or_enable.2Fdisable_services.3F&quot; hreflang=&quot;en&quot;&gt;Systemd : how to enable and start services [Fedora wiki]&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
        
              </item>
      </channel>
</rss>
