• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Webmin and OpenVPN help (CentOS 8)

Joined
Aug 29, 2005
Messages
7,062 (1.04/day)
Location
Asked my ISP.... 0.0
System Name Lynni PS \ Lenowo TwinkPad T480
Processor AMD Ryzen 7 7700 Raphael \ i7-8550U Kaby Lake-R
Motherboard ASRock B650M PG Riptide Bios v. 2.02 AMD AGESA 1.1.0.0 \ Lenowo 20L60036MX Bios 1.47
Cooling Noctua NH-D15 Chromax.Black (Only middle fan) \ Lenowo WN-2
Memory G.Skill Flare X5 2x16GB DDR5 6000MHZ CL36-36-36-96 AMD EXPO \ Willk Elektronik 2x16GB 2666MHZ CL17
Video Card(s) Asus GeForce RTX™ 4070 Dual OC GPU: 2325-2355 MEM: 1462| Nvidia GeForce MX™ 150 2GB GDDR5 Micron
Storage Gigabyte M30 1TB|Sabrent Rocket 2TB| HDD: 10TB|1TB \ SKHynix 256GB 2242 3x2
Display(s) LG UltraGear 27GP850-B 1440p@165Hz | LG 48CX OLED 4K HDR | AUO 14" 1440p IPS
Case Fractal Design Meshify 2 Tempered Glass White/Black | Lenowo T480 chassis
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Be Quiet! Pure Power 12 M 750W Goldie | 65W
Mouse Logitech G305 Lightspeedy Wireless | Lenowo TouchPad & Logitech G305
Keyboard Akko 3108 DS Horizon V2 Cream Yellow | T480 UK Lumi
Software Win11 Pro 23H2 UK
Benchmark Scores 3DMARK: https://www.3dmark.com/3dm/89434432? GPU-Z: https://www.techpowerup.com/gpuz/details/v3zbr
I have set up a lot of CentOS 6 servers with Webmin and OpenVPN but CentOS 8 is really giving me a headache and everytime I try to google my issue there isn't a general answer there are different answers and this really gives me a headache.

I need to get OpenVPN managed in Webmin on CentOS 8 but only thing that works is through the terminal and this is a no go because it need to easy to manage.

I have disabled SELinux and firewalld because they are not needed here (Firewalld is disabled because the server is behind a router).

I have tried several guides, even tried how I do on the older CentOS 6 but everytime I try to start OpenVPN through Webmin I receive this error: Command Execution Error systemctl start openvpn@%s.

It doesn't matter what name I give the VPN even if I follow a guide that doesn't come into this issue I do everytime.

I would love if someone could help me out since I am not the biggest linux guy more Windows.
 

Solaris17

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
25,776 (3.79/day)
Location
Alabama
System Name Rocinante
Processor I9 14900KS
Motherboard EVGA z690 Dark KINGPIN (modded BIOS)
Cooling EK-AIO Elite 360 D-RGB
Memory 64GB Gskill Trident Z5 DDR5 6000 @6400
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 500GB 980 Pro | 1x 1TB 980 Pro | 1x 8TB Corsair MP400
Display(s) Odyssey OLED G9 G95SC
Case Lian Li o11 Evo Dynamic White
Audio Device(s) Moondrop S8's on Schiit Hel 2e
Power Supply Bequiet! Power Pro 12 1500w
Mouse Lamzu Atlantis mini (White)
Keyboard Monsgeek M3 Lavender, Akko Crystal Blues
VR HMD Quest 3
Software Windows 11
Benchmark Scores I dont have time for that.
thats not enough info what do the logs say? what does journalctl -xe say?
 
Joined
Aug 29, 2005
Messages
7,062 (1.04/day)
Location
Asked my ISP.... 0.0
System Name Lynni PS \ Lenowo TwinkPad T480
Processor AMD Ryzen 7 7700 Raphael \ i7-8550U Kaby Lake-R
Motherboard ASRock B650M PG Riptide Bios v. 2.02 AMD AGESA 1.1.0.0 \ Lenowo 20L60036MX Bios 1.47
Cooling Noctua NH-D15 Chromax.Black (Only middle fan) \ Lenowo WN-2
Memory G.Skill Flare X5 2x16GB DDR5 6000MHZ CL36-36-36-96 AMD EXPO \ Willk Elektronik 2x16GB 2666MHZ CL17
Video Card(s) Asus GeForce RTX™ 4070 Dual OC GPU: 2325-2355 MEM: 1462| Nvidia GeForce MX™ 150 2GB GDDR5 Micron
Storage Gigabyte M30 1TB|Sabrent Rocket 2TB| HDD: 10TB|1TB \ SKHynix 256GB 2242 3x2
Display(s) LG UltraGear 27GP850-B 1440p@165Hz | LG 48CX OLED 4K HDR | AUO 14" 1440p IPS
Case Fractal Design Meshify 2 Tempered Glass White/Black | Lenowo T480 chassis
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Be Quiet! Pure Power 12 M 750W Goldie | 65W
Mouse Logitech G305 Lightspeedy Wireless | Lenowo TouchPad & Logitech G305
Keyboard Akko 3108 DS Horizon V2 Cream Yellow | T480 UK Lumi
Software Win11 Pro 23H2 UK
Benchmark Scores 3DMARK: https://www.3dmark.com/3dm/89434432? GPU-Z: https://www.techpowerup.com/gpuz/details/v3zbr
thats not enough info what do the logs say? what does journalctl -xe say?

Right now I am on a fresh install and created everything through Webmin-->Servers-->OpenVPN + CA

I didn't get an errors in the creation process but when I hit start I get this error: Command Execution Error systemctl start openvpn@%s.

And if I do journalctl -xe:
Sep 02 10:05:29 localhost.localdomain systemd[1]: openvpn-server@server.service: Service RestartSec=5s expired, scheduling restart.
Sep 02 10:05:29 localhost.localdomain systemd[1]: openvpn-server@server.service: Scheduled restart job, restart counter is at 144.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Automatic restarting of the unit openvpn-server@server.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Sep 02 10:05:29 localhost.localdomain systemd[1]: Stopped OpenVPN service for server.
-- Subject: Unit openvpn-server@server.service has finished shutting down
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit openvpn-server@server.service has finished shutting down.
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --dh fails with 'dh2048.pem': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --ca fails with 'ca.crt': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --cert fails with 'server.crt': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: WARNING: cannot stat file 'server.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --key fails with 'server.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: WARNING: cannot stat file 'ta.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --tls-auth fails with 'ta.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: Please correct these errors.
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Use --help for more information.
Sep 02 10:05:29 localhost.localdomain systemd[1]: Starting OpenVPN service for server...
-- Subject: Unit openvpn-server@server.service has begun start-up
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit openvpn-server@server.service has begun starting up.
Sep 02 10:05:29 localhost.localdomain systemd[1]: openvpn-server@server.service: Main process exited, code=exited, status=1/FAILURE
Sep 02 10:05:29 localhost.localdomain systemd[1]: openvpn-server@server.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- The unit openvpn-server@server.service has entered the 'failed' state with result 'exit-code'.
Sep 02 10:05:29 localhost.localdomain systemd[1]: Failed to start OpenVPN service for server.
-- Subject: Unit openvpn-server@server.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit openvpn-server@server.service has failed.
--
-- The result is failed.

It's annoying because when I check with File Manager I see all the contain in the keys folder:
1630591791820.png
 

Solaris17

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
25,776 (3.79/day)
Location
Alabama
System Name Rocinante
Processor I9 14900KS
Motherboard EVGA z690 Dark KINGPIN (modded BIOS)
Cooling EK-AIO Elite 360 D-RGB
Memory 64GB Gskill Trident Z5 DDR5 6000 @6400
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 500GB 980 Pro | 1x 1TB 980 Pro | 1x 8TB Corsair MP400
Display(s) Odyssey OLED G9 G95SC
Case Lian Li o11 Evo Dynamic White
Audio Device(s) Moondrop S8's on Schiit Hel 2e
Power Supply Bequiet! Power Pro 12 1500w
Mouse Lamzu Atlantis mini (White)
Keyboard Monsgeek M3 Lavender, Akko Crystal Blues
VR HMD Quest 3
Software Windows 11
Benchmark Scores I dont have time for that.
Code:
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --dh fails with 'dh2048.pem': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --ca fails with 'ca.crt': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --cert fails with 'server.crt': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: WARNING: cannot stat file 'server.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --key fails with 'server.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: WARNING: cannot stat file 'ta.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --tls-auth fails with 'ta.key': No such file or directory (errno=2)

That is the issue. OpenVPN is trying to get the files from the wrong location.

You need to take the path of the files from the screen shot above and make sure they are in the openvpn config which is Something like:

/etc/openvpn/client.conf

once you find the openVPN file edit it and make sure the paths match what webmin says above.

Alternatively if you want this issue not to come back between version upgrades, you can move all the files to the path openVPN expects.
 
Joined
Aug 29, 2005
Messages
7,062 (1.04/day)
Location
Asked my ISP.... 0.0
System Name Lynni PS \ Lenowo TwinkPad T480
Processor AMD Ryzen 7 7700 Raphael \ i7-8550U Kaby Lake-R
Motherboard ASRock B650M PG Riptide Bios v. 2.02 AMD AGESA 1.1.0.0 \ Lenowo 20L60036MX Bios 1.47
Cooling Noctua NH-D15 Chromax.Black (Only middle fan) \ Lenowo WN-2
Memory G.Skill Flare X5 2x16GB DDR5 6000MHZ CL36-36-36-96 AMD EXPO \ Willk Elektronik 2x16GB 2666MHZ CL17
Video Card(s) Asus GeForce RTX™ 4070 Dual OC GPU: 2325-2355 MEM: 1462| Nvidia GeForce MX™ 150 2GB GDDR5 Micron
Storage Gigabyte M30 1TB|Sabrent Rocket 2TB| HDD: 10TB|1TB \ SKHynix 256GB 2242 3x2
Display(s) LG UltraGear 27GP850-B 1440p@165Hz | LG 48CX OLED 4K HDR | AUO 14" 1440p IPS
Case Fractal Design Meshify 2 Tempered Glass White/Black | Lenowo T480 chassis
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Be Quiet! Pure Power 12 M 750W Goldie | 65W
Mouse Logitech G305 Lightspeedy Wireless | Lenowo TouchPad & Logitech G305
Keyboard Akko 3108 DS Horizon V2 Cream Yellow | T480 UK Lumi
Software Win11 Pro 23H2 UK
Benchmark Scores 3DMARK: https://www.3dmark.com/3dm/89434432? GPU-Z: https://www.techpowerup.com/gpuz/details/v3zbr
Code:
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --dh fails with 'dh2048.pem': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --ca fails with 'ca.crt': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --cert fails with 'server.crt': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: WARNING: cannot stat file 'server.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --key fails with 'server.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: WARNING: cannot stat file 'ta.key': No such file or directory (errno=2)
Sep 02 10:05:29 localhost.localdomain openvpn[33129]: Options error: --tls-auth fails with 'ta.key': No such file or directory (errno=2)

That is the issue. OpenVPN is trying to get the files from the wrong location.

You need to take the path of the files from the screen shot above and make sure they are in the openvpn config.

Something like

I tried adding the full path but then the openvpn module in webmin cannot see any files.

The weirdest part is this is made in the openvpn module for webmin and when I check the config file everything is where it's suppose to be.

So is this really just a CentOS 8 issue?
 

Solaris17

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
25,776 (3.79/day)
Location
Alabama
System Name Rocinante
Processor I9 14900KS
Motherboard EVGA z690 Dark KINGPIN (modded BIOS)
Cooling EK-AIO Elite 360 D-RGB
Memory 64GB Gskill Trident Z5 DDR5 6000 @6400
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 500GB 980 Pro | 1x 1TB 980 Pro | 1x 8TB Corsair MP400
Display(s) Odyssey OLED G9 G95SC
Case Lian Li o11 Evo Dynamic White
Audio Device(s) Moondrop S8's on Schiit Hel 2e
Power Supply Bequiet! Power Pro 12 1500w
Mouse Lamzu Atlantis mini (White)
Keyboard Monsgeek M3 Lavender, Akko Crystal Blues
VR HMD Quest 3
Software Windows 11
Benchmark Scores I dont have time for that.
Joined
Aug 29, 2005
Messages
7,062 (1.04/day)
Location
Asked my ISP.... 0.0
System Name Lynni PS \ Lenowo TwinkPad T480
Processor AMD Ryzen 7 7700 Raphael \ i7-8550U Kaby Lake-R
Motherboard ASRock B650M PG Riptide Bios v. 2.02 AMD AGESA 1.1.0.0 \ Lenowo 20L60036MX Bios 1.47
Cooling Noctua NH-D15 Chromax.Black (Only middle fan) \ Lenowo WN-2
Memory G.Skill Flare X5 2x16GB DDR5 6000MHZ CL36-36-36-96 AMD EXPO \ Willk Elektronik 2x16GB 2666MHZ CL17
Video Card(s) Asus GeForce RTX™ 4070 Dual OC GPU: 2325-2355 MEM: 1462| Nvidia GeForce MX™ 150 2GB GDDR5 Micron
Storage Gigabyte M30 1TB|Sabrent Rocket 2TB| HDD: 10TB|1TB \ SKHynix 256GB 2242 3x2
Display(s) LG UltraGear 27GP850-B 1440p@165Hz | LG 48CX OLED 4K HDR | AUO 14" 1440p IPS
Case Fractal Design Meshify 2 Tempered Glass White/Black | Lenowo T480 chassis
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Be Quiet! Pure Power 12 M 750W Goldie | 65W
Mouse Logitech G305 Lightspeedy Wireless | Lenowo TouchPad & Logitech G305
Keyboard Akko 3108 DS Horizon V2 Cream Yellow | T480 UK Lumi
Software Win11 Pro 23H2 UK
Benchmark Scores 3DMARK: https://www.3dmark.com/3dm/89434432? GPU-Z: https://www.techpowerup.com/gpuz/details/v3zbr
Nope, Cent doesnt make webmin or openVPN

This isnt openVPN either because it is expecting the path.

This is a webmin problem.

It looks like you havent tried enough, but if you have tried everything you are willing too then this will remain broken as expected.

Here are results based on your -xe


I looked in the WorkingDirectory in openvpn-server@.service file in systemd:
1630649075904.png


and this points to WorkingDirectory=/etc/openvpn/server but webmin puts it in /etc/openvpn/servers :banghead:
 
Top