• 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
5,965 (1.02/day)
Location
Whatever my internet protocol shows I guess O.o
System Name Lynni The Dragon (Maintenance)
Processor Intel Core i7-11700K "Rocket Lake"
Motherboard Gigabyte Z590 Vision G
Cooling Fractal Design Celsius S24
Memory Geil Dragon 4x8GB@3000mhz 15-17-17-35 (GWW416GB3000C15DC)
Video Card(s) MSI GeForce RTX 3090 Ventus 3X 24G OC | Sapphire Radeon RX 590 Nitro+ Special Edition 8GB
Storage OS/Games:Samsung 970 EVO 1TB|Sabrent Rocket 2TB|Data: 850EVO 1TB, 3xWD 4TB, 1xWD 10TB & WD 1TB
Display(s) Asus ROG Strix XG27UQ 4K@144hz | LG 55UK6100PLB IPS 4K HDR | LG 48CX OLED 4K HDR
Case Fractal Design Meshify 2 Tempered Glass White/Black
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Seasonic Prime 1200 watt 80Plus Platinum
Mouse Logitech G305 Lightspeedy Wireless
Keyboard Razer Blackwidow Chroma X UK
VR HMD No not gonna sell myself to FB!i!i!
Software Win10 Pro UK x64 (21H1) / Win11 Pro 21H2 UK (Build 22000.100)
Benchmark Scores Time Spy: https://www.3dmark.com/3dm/33868867? GPU-Z: https://www.techpowerup.com/gpuz/details/h93ag
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

Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
22,453 (3.82/day)
Location
Florida
System Name Venslar
Processor I9 7980XE
Motherboard MSI x299 Tomahawk Arctic
Cooling EK Custom
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Nvidia Titan RTX
Storage 1x 250GB 960 EVO | 1x 500gb Intel 720p | 32TB SAN
Display(s) 3x AOC Q2577PWQ (2k IPS)
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Schiit Fulla 3 on Beyerdynamic DT 990 Pros
Power Supply Seasonic 1050W Snow
Mouse M55 RGB PRO (White)
Keyboard Ducky Shine 6 Snow White
VR HMD HTC VIVE
Software Windows 10 x64 Pro
thats not enough info what do the logs say? what does journalctl -xe say?
 
Joined
Aug 29, 2005
Messages
5,965 (1.02/day)
Location
Whatever my internet protocol shows I guess O.o
System Name Lynni The Dragon (Maintenance)
Processor Intel Core i7-11700K "Rocket Lake"
Motherboard Gigabyte Z590 Vision G
Cooling Fractal Design Celsius S24
Memory Geil Dragon 4x8GB@3000mhz 15-17-17-35 (GWW416GB3000C15DC)
Video Card(s) MSI GeForce RTX 3090 Ventus 3X 24G OC | Sapphire Radeon RX 590 Nitro+ Special Edition 8GB
Storage OS/Games:Samsung 970 EVO 1TB|Sabrent Rocket 2TB|Data: 850EVO 1TB, 3xWD 4TB, 1xWD 10TB & WD 1TB
Display(s) Asus ROG Strix XG27UQ 4K@144hz | LG 55UK6100PLB IPS 4K HDR | LG 48CX OLED 4K HDR
Case Fractal Design Meshify 2 Tempered Glass White/Black
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Seasonic Prime 1200 watt 80Plus Platinum
Mouse Logitech G305 Lightspeedy Wireless
Keyboard Razer Blackwidow Chroma X UK
VR HMD No not gonna sell myself to FB!i!i!
Software Win10 Pro UK x64 (21H1) / Win11 Pro 21H2 UK (Build 22000.100)
Benchmark Scores Time Spy: https://www.3dmark.com/3dm/33868867? GPU-Z: https://www.techpowerup.com/gpuz/details/h93ag
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

Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
22,453 (3.82/day)
Location
Florida
System Name Venslar
Processor I9 7980XE
Motherboard MSI x299 Tomahawk Arctic
Cooling EK Custom
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Nvidia Titan RTX
Storage 1x 250GB 960 EVO | 1x 500gb Intel 720p | 32TB SAN
Display(s) 3x AOC Q2577PWQ (2k IPS)
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Schiit Fulla 3 on Beyerdynamic DT 990 Pros
Power Supply Seasonic 1050W Snow
Mouse M55 RGB PRO (White)
Keyboard Ducky Shine 6 Snow White
VR HMD HTC VIVE
Software Windows 10 x64 Pro
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
5,965 (1.02/day)
Location
Whatever my internet protocol shows I guess O.o
System Name Lynni The Dragon (Maintenance)
Processor Intel Core i7-11700K "Rocket Lake"
Motherboard Gigabyte Z590 Vision G
Cooling Fractal Design Celsius S24
Memory Geil Dragon 4x8GB@3000mhz 15-17-17-35 (GWW416GB3000C15DC)
Video Card(s) MSI GeForce RTX 3090 Ventus 3X 24G OC | Sapphire Radeon RX 590 Nitro+ Special Edition 8GB
Storage OS/Games:Samsung 970 EVO 1TB|Sabrent Rocket 2TB|Data: 850EVO 1TB, 3xWD 4TB, 1xWD 10TB & WD 1TB
Display(s) Asus ROG Strix XG27UQ 4K@144hz | LG 55UK6100PLB IPS 4K HDR | LG 48CX OLED 4K HDR
Case Fractal Design Meshify 2 Tempered Glass White/Black
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Seasonic Prime 1200 watt 80Plus Platinum
Mouse Logitech G305 Lightspeedy Wireless
Keyboard Razer Blackwidow Chroma X UK
VR HMD No not gonna sell myself to FB!i!i!
Software Win10 Pro UK x64 (21H1) / Win11 Pro 21H2 UK (Build 22000.100)
Benchmark Scores Time Spy: https://www.3dmark.com/3dm/33868867? GPU-Z: https://www.techpowerup.com/gpuz/details/h93ag
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

Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
22,453 (3.82/day)
Location
Florida
System Name Venslar
Processor I9 7980XE
Motherboard MSI x299 Tomahawk Arctic
Cooling EK Custom
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Nvidia Titan RTX
Storage 1x 250GB 960 EVO | 1x 500gb Intel 720p | 32TB SAN
Display(s) 3x AOC Q2577PWQ (2k IPS)
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Schiit Fulla 3 on Beyerdynamic DT 990 Pros
Power Supply Seasonic 1050W Snow
Mouse M55 RGB PRO (White)
Keyboard Ducky Shine 6 Snow White
VR HMD HTC VIVE
Software Windows 10 x64 Pro
Joined
Aug 29, 2005
Messages
5,965 (1.02/day)
Location
Whatever my internet protocol shows I guess O.o
System Name Lynni The Dragon (Maintenance)
Processor Intel Core i7-11700K "Rocket Lake"
Motherboard Gigabyte Z590 Vision G
Cooling Fractal Design Celsius S24
Memory Geil Dragon 4x8GB@3000mhz 15-17-17-35 (GWW416GB3000C15DC)
Video Card(s) MSI GeForce RTX 3090 Ventus 3X 24G OC | Sapphire Radeon RX 590 Nitro+ Special Edition 8GB
Storage OS/Games:Samsung 970 EVO 1TB|Sabrent Rocket 2TB|Data: 850EVO 1TB, 3xWD 4TB, 1xWD 10TB & WD 1TB
Display(s) Asus ROG Strix XG27UQ 4K@144hz | LG 55UK6100PLB IPS 4K HDR | LG 48CX OLED 4K HDR
Case Fractal Design Meshify 2 Tempered Glass White/Black
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Seasonic Prime 1200 watt 80Plus Platinum
Mouse Logitech G305 Lightspeedy Wireless
Keyboard Razer Blackwidow Chroma X UK
VR HMD No not gonna sell myself to FB!i!i!
Software Win10 Pro UK x64 (21H1) / Win11 Pro 21H2 UK (Build 22000.100)
Benchmark Scores Time Spy: https://www.3dmark.com/3dm/33868867? GPU-Z: https://www.techpowerup.com/gpuz/details/h93ag
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