How do you tell OpenVPN to run on startup?

Multi tool use
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I've done these exact same steps on two Ubuntu computers and it works just fine. I copied the exact same foo.conf
file (along with a corresponding auth.txt file) into /etc/openvpn/
and it works if I manually enter service openvpn start
. But I can't get it to work on startup. I don't remember having a problem before. It just worked.
/var/log/openvpn
is empty. /etc/default/openvpn
matches the working computer (AUTOSTART="all" is commented so it should use all by default).
It's not starting the VPN after a reboot though.
debian systemd openvpn
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
1
down vote
favorite
I've done these exact same steps on two Ubuntu computers and it works just fine. I copied the exact same foo.conf
file (along with a corresponding auth.txt file) into /etc/openvpn/
and it works if I manually enter service openvpn start
. But I can't get it to work on startup. I don't remember having a problem before. It just worked.
/var/log/openvpn
is empty. /etc/default/openvpn
matches the working computer (AUTOSTART="all" is commented so it should use all by default).
It's not starting the VPN after a reboot though.
debian systemd openvpn
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I've done these exact same steps on two Ubuntu computers and it works just fine. I copied the exact same foo.conf
file (along with a corresponding auth.txt file) into /etc/openvpn/
and it works if I manually enter service openvpn start
. But I can't get it to work on startup. I don't remember having a problem before. It just worked.
/var/log/openvpn
is empty. /etc/default/openvpn
matches the working computer (AUTOSTART="all" is commented so it should use all by default).
It's not starting the VPN after a reboot though.
debian systemd openvpn
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I've done these exact same steps on two Ubuntu computers and it works just fine. I copied the exact same foo.conf
file (along with a corresponding auth.txt file) into /etc/openvpn/
and it works if I manually enter service openvpn start
. But I can't get it to work on startup. I don't remember having a problem before. It just worked.
/var/log/openvpn
is empty. /etc/default/openvpn
matches the working computer (AUTOSTART="all" is commented so it should use all by default).
It's not starting the VPN after a reboot though.
debian systemd openvpn
debian systemd openvpn
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 27 mins ago


Filipe Brandenburger
5,2441624
5,2441624
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 hours ago
user875234
1062
1062
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Found an answer.
Replace <server> with the name of your configuration file.
sudo systemctl enable <server>.service
sudo systemctl start <server>.service
So for /etc/openvpn/foo.conf
it would be
sudo systemctl enable foo.service
sudo systemctl start foo.service
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This looks wrong to me... It will only work if there is a foo.service, created by you (which is what the answer at askfedora suggests) or by a generator of some kind... Do you already have a openvpn.service or perhaps openvpn@.service on your system? Please post which distribution version you're using (Debian Stretch?) and confirm which version of OpenVPN package you have around... If you can find the systemd services for OpenVPN their contents are also helpful here.
– Filipe Brandenburger
27 mins ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Found an answer.
Replace <server> with the name of your configuration file.
sudo systemctl enable <server>.service
sudo systemctl start <server>.service
So for /etc/openvpn/foo.conf
it would be
sudo systemctl enable foo.service
sudo systemctl start foo.service
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This looks wrong to me... It will only work if there is a foo.service, created by you (which is what the answer at askfedora suggests) or by a generator of some kind... Do you already have a openvpn.service or perhaps openvpn@.service on your system? Please post which distribution version you're using (Debian Stretch?) and confirm which version of OpenVPN package you have around... If you can find the systemd services for OpenVPN their contents are also helpful here.
– Filipe Brandenburger
27 mins ago
add a comment |
up vote
0
down vote
Found an answer.
Replace <server> with the name of your configuration file.
sudo systemctl enable <server>.service
sudo systemctl start <server>.service
So for /etc/openvpn/foo.conf
it would be
sudo systemctl enable foo.service
sudo systemctl start foo.service
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This looks wrong to me... It will only work if there is a foo.service, created by you (which is what the answer at askfedora suggests) or by a generator of some kind... Do you already have a openvpn.service or perhaps openvpn@.service on your system? Please post which distribution version you're using (Debian Stretch?) and confirm which version of OpenVPN package you have around... If you can find the systemd services for OpenVPN their contents are also helpful here.
– Filipe Brandenburger
27 mins ago
add a comment |
up vote
0
down vote
up vote
0
down vote
Found an answer.
Replace <server> with the name of your configuration file.
sudo systemctl enable <server>.service
sudo systemctl start <server>.service
So for /etc/openvpn/foo.conf
it would be
sudo systemctl enable foo.service
sudo systemctl start foo.service
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Found an answer.
Replace <server> with the name of your configuration file.
sudo systemctl enable <server>.service
sudo systemctl start <server>.service
So for /etc/openvpn/foo.conf
it would be
sudo systemctl enable foo.service
sudo systemctl start foo.service
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 2 hours ago
user875234
1062
1062
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user875234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This looks wrong to me... It will only work if there is a foo.service, created by you (which is what the answer at askfedora suggests) or by a generator of some kind... Do you already have a openvpn.service or perhaps openvpn@.service on your system? Please post which distribution version you're using (Debian Stretch?) and confirm which version of OpenVPN package you have around... If you can find the systemd services for OpenVPN their contents are also helpful here.
– Filipe Brandenburger
27 mins ago
add a comment |
This looks wrong to me... It will only work if there is a foo.service, created by you (which is what the answer at askfedora suggests) or by a generator of some kind... Do you already have a openvpn.service or perhaps openvpn@.service on your system? Please post which distribution version you're using (Debian Stretch?) and confirm which version of OpenVPN package you have around... If you can find the systemd services for OpenVPN their contents are also helpful here.
– Filipe Brandenburger
27 mins ago
This looks wrong to me... It will only work if there is a foo.service, created by you (which is what the answer at askfedora suggests) or by a generator of some kind... Do you already have a openvpn.service or perhaps openvpn@.service on your system? Please post which distribution version you're using (Debian Stretch?) and confirm which version of OpenVPN package you have around... If you can find the systemd services for OpenVPN their contents are also helpful here.
– Filipe Brandenburger
27 mins ago
This looks wrong to me... It will only work if there is a foo.service, created by you (which is what the answer at askfedora suggests) or by a generator of some kind... Do you already have a openvpn.service or perhaps openvpn@.service on your system? Please post which distribution version you're using (Debian Stretch?) and confirm which version of OpenVPN package you have around... If you can find the systemd services for OpenVPN their contents are also helpful here.
– Filipe Brandenburger
27 mins ago
add a comment |
user875234 is a new contributor. Be nice, and check out our Code of Conduct.
user875234 is a new contributor. Be nice, and check out our Code of Conduct.
user875234 is a new contributor. Be nice, and check out our Code of Conduct.
user875234 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481039%2fhow-do-you-tell-openvpn-to-run-on-startup%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password