LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2013, 10:36 AM   #1
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Rep: Reputation: Disabled
Can't connect t VPN server.


I followed this guide, (https://www.digitalocean.com/communi...er-on-centos-6) everything went successful in the guide however when its time to connect to the VPN server I get an error that the server refused the connection immediatley. I tried disabling the firewall and I have the 1194 TCP port enabled.

Last edited by Altiris; 09-05-2013 at 07:20 PM.
 
Old 08-25-2013, 05:29 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Probably the entries from whatever log file the OpenVPN daemon logs to?
 
Old 08-25-2013, 11:21 AM   #3
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Probably the entries from whatever log file the OpenVPN daemon logs to?
Yeah I found it, its in /var/log/messages

Code:
Aug 25 12:06:07 necc-data openvpn[3779]: Options error: --dh fails with 'dh1024.pem': No such file or directory
Aug 25 12:06:07 necc-data openvpn[3779]: Options error: Please correct these errors.
Aug 25 12:06:07 necc-data openvpn[3779]: Use --help for more information.
 
Old 08-25-2013, 11:36 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Altiris View Post
Yeah I found it, its in /var/log/messages

Code:
Aug 25 12:06:07 necc-data openvpn[3779]: Options error: --dh fails with 'dh1024.pem': No such file or directory
Aug 25 12:06:07 necc-data openvpn[3779]: Options error: Please correct these errors.
Aug 25 12:06:07 necc-data openvpn[3779]: Use --help for more information.
Great...so did you create dh parameter file using build-dh script? Did you check its permissions/folder location? If it can't find the file, then either you didn't create it, or it can't be read. Did you try the "--help" parameter, as the log said?

Also, are you starting this as root?
 
Old 08-25-2013, 07:44 PM   #5
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Great...so did you create dh parameter file using build-dh script? Did you check its permissions/folder location? If it can't find the file, then either you didn't create it, or it can't be read. Did you try the "--help" parameter, as the log said?

Also, are you starting this as root?
There is no such dh1024.pem file HOWEVER I have a dh2048.pem file, weird right? Why is it doubled instead of just 1024? Alright for some reason by default the vars file had the key set to 2048 instead of 1024. I will put back to 1024.

Last edited by Altiris; 08-25-2013 at 07:53 PM.
 
Old 08-25-2013, 08:21 PM   #6
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Everything is working now sweet!

EDIT: I can't connect to it now for some reason. I am using OpenVPN Client and I have port forwarded 1194 UDP and TCP.

Last edited by Altiris; 08-26-2013 at 09:34 AM.
 
Old 09-02-2013, 03:27 PM   #7
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
For some reason I cant connect, it says the connection is refused. Is my firewall on the server blocking something?
 
Old 09-02-2013, 07:15 PM   #8
rosehosting.com
Member
 
Registered: Jun 2012
Location: Missouri, USA
Posts: 236

Rep: Reputation: 64
Edit your OpenVPN configuration file (i.e. /etc/openvpn/server.conf) and add/modify the following lines:

status openvpn-status.log
log openvpn.log
verb 6

Then, restart your OpenVPN service for the changes to take effect and check your '/etc/openvpn/openvpn.log' and '/etc/openvpn/openvpn-status.log' files to see if there are any connection problem messages which might help you to track down the problem.
 
Old 09-03-2013, 07:39 PM   #9
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rosehosting.com View Post
Edit your OpenVPN configuration file (i.e. /etc/openvpn/server.conf) and add/modify the following lines:

status openvpn-status.log
log openvpn.log
verb 6

Then, restart your OpenVPN service for the changes to take effect and check your '/etc/openvpn/openvpn.log' and '/etc/openvpn/openvpn-status.log' files to see if there are any connection problem messages which might help you to track down the problem.
Thanks, I did this and tried connecting from my windows pc, I get the error, I look in the log and it seems its not displaying anything...so its not even able to connect to it?
 
Old 09-05-2013, 07:19 PM   #10
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Help please?
 
Old 09-05-2013, 08:03 PM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
Yes, there is a good chance that your firewall is blocking it, if you get no log entries.
 
Old 09-06-2013, 08:44 AM   #12
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
Yes, there is a good chance that your firewall is blocking it, if you get no log entries.
I disabled the firewall though and I still couldnt connect. Did I mess up somewhere when making the CA files?
 
Old 09-06-2013, 11:29 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Altiris View Post
I disabled the firewall though and I still couldnt connect. Did I mess up somewhere when making the CA files?
No...again, if you're not getting ANY log file entries, that means there is no connection being seen. Which means it's getting blocked SOMEWHERE. You don't really say anything about your network topology, where these machines are that you're trying to connect, and what they're running through.
 
Old 09-06-2013, 12:23 PM   #14
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
No...again, if you're not getting ANY log file entries, that means there is no connection being seen. Which means it's getting blocked SOMEWHERE. You don't really say anything about your network topology, where these machines are that you're trying to connect, and what they're running through.
Sorry, I will try and clarify. I have OpenVPN setup on a linux box with an ip of 192.168.12.137. I try connecting to my personal PC tot he OpenVPN server locally using the OpenVPN Client by typing 192.168.12.137:11904. The OpenVPN Client allows me to select the .ovpn file and I do, I hit connect and it says conncetion refused.
 
Old 09-09-2013, 06:11 AM   #15
JML_SUSA
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
Hi guys,

I currently use Ceano Colt for cloud hosting. Anyone else here used Ceano's cloud hosting services to setup and configure an OpenVPN server on CentOS 6 ?!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openvpn start failed lunocio Linux - Networking 2 06-05-2012 08:53 PM
OpenVPN won't start jonaskellens Linux - Newbie 3 08-19-2011 12:17 PM
Openvpn start failed leiw Linux - Networking 1 05-20-2008 12:51 AM
Can't start windows openvpn client bambeklis Linux - Networking 2 04-09-2008 08:14 AM
Some good tricks/advices to start setting up a Openvpn server ? Xeratul Linux - General 1 05-30-2007 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration