# systemd vs openvpn

## Fran

Ok, so I've migrated to systemd to see what the fuss is all about, and I don't dislike what I see. But I'm having problems with openvpn: I understand I have to systemctl enable openvpn@openvpn, where the second openvpn is due to my configuration being in openvpn.conf. That works, but only after I have modprobed tun by hand. Otherwise it fails. With openrc, tun was auto loaded. I think I can use /etc/modules-load.d/ to load the tun module at boot, but should't systemd load it when needed (i.e., when starting openvpn@whatever)?

----------

## mani001

Damn (i.e. córcholis  :Smile:  ) , I was about to try systemd myself and I also use openvpn... I'm glad that you tried first   :Razz:   Did you get to solve it?

----------

## GFCCAE6xF

I think the way is that you have your extra modules needed in, for example /etc/modules-load.d/tun.conf (so yes, you thought right   :Very Happy: ).

> but should't systemd load it when needed (i.e., when starting openvpn@whatever)?

Does openrc load the tun module on demand or at boot? Anyway I don't believe kernel modules are, maybe you are confused with the on-demand service/socket/etc loading?

----------

## Fran

 *mani001 wrote:*   

> Damn (i.e. córcholis  ) , I was about to try systemd myself and I also use openvpn... I'm glad that you tried first    Did you get to solve it?

 

Yep, just load tun at boot (echo "tun" > /etc/modules-load.d/tun.conf). Not the most elegant solution but hey, it works.

 *rorgoroth wrote:*   

> Does openrc load the tun module on demand or at boot? Anyway I don't believe kernel modules are, maybe you are confused with the on-demand service/socket/etc loading?

 

hmmm... IDK, maybe the init.d/openvpn script modprobed tun. I can't check it now; I removed all traces of openrc in etc/init.d  :Very Happy:  (after finding a replacement for the essential /etc/init.d/functions.sh). 

Anyway, I think the openvpn@.service should take care of loading the tun module somehow.

----------

