LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-25-2012, 04:45 AM   #1
Anselme
LQ Newbie
 
Registered: Aug 2012
Location: Toulouse, France
Distribution: Fedora
Posts: 3

Rep: Reputation: Disabled
configuring openvpn with an ip failover


Hello, I'm trying to set up an openvpn server on a dedicated server with fedora, and setting it up to work with the failover IP (eth0:0) of my server.
(an apache server is already running successfully through the failover IP)

cat /etc/openvpn/server.conf
Quote:
# Serveur TCP/443
mode server
proto tcp
port 443
dev tun
# Cles et certificats
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 0
cipher AES-256-CBC
# Reseau
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 4.4.4.4"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
# Securite
user nobody
group nogroup
chroot /etc/openvpn/jail
persist-key
persist-tun
comp-lzo
# Log
verb 3
mute 20
status openvpn-status.log
log-append /var/log/openvpn.log
openvpn --version
Quote:
OpenVPN 2.0_rc6 x86_64-unknown-linux [SSL] [LZO] [EPOLL] built on Oct 17 2011
Copyright (C) 2002-2004 James Yonan <jim@yonan.net>
is "unknown-linux" normal?

I tried to launch openvpn

service openvpn start
Quote:
Starting openvpn (via systemctl): [ OK ]
cat /var/log/openvpn.log
Quote:
Options error: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: script-security
Use --help for more information.
Options error: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: script-security
Use --help for more information.
Options error: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: script-security
Use --help for more information.
Sat Aug 25 11:00:15 2012 OpenVPN 2.0_rc6 x86_64-unknown-linux [SSL] [LZO] [EPOLL] built on Oct 17 2011
Sat Aug 25 11:00:15 2012 Cannot open dh1024.pem for DH parameters: error:02001002:system library:fopen:No such file or directory: error:2006D080:BIO routines:BIO_new_file:no such file
Sat Aug 25 11:00:15 2012 Exiting
Sat Aug 25 11:02:57 2012 OpenVPN 2.0_rc6 x86_64-unknown-linux [SSL] [LZO] [EPOLL] built on Oct 17 2011
Sat Aug 25 11:02:57 2012 Cannot open dh1024.pem for DH parameters: error:02001002:system library:fopen:No such file or directory: error:2006D080:BIO routines:BIO_new_file:no such file
Sat Aug 25 11:02:57 2012 Exiting
I don't understand how openvpn has to be configured to start properly.
 
Old 08-25-2012, 08:19 AM   #2
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Openvpn server can be setup in two ways.

1. Static key based
2. Certificate based

To get help for simple static key based setup (server configuration file) click OpenVpn HOWTO

you can set variable verb to 9 for diagnostic purpose. Also check the log file for errors. You are using port 443 in server configuration. Make sure it is correct because if Apache is using the same 443 port as SSL it may not start

Last edited by KinnowGrower; 08-25-2012 at 08:22 AM.
 
Old 08-25-2012, 03:58 PM   #3
Anselme
LQ Newbie
 
Registered: Aug 2012
Location: Toulouse, France
Distribution: Fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
My server has to be certificate based, 3-4 users will be connected simultaneously, i followed a tutorial to make a first certificate, but the problem is not a connection problem right now, the server don't even starts.
What means: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: script-security ?
where do i have to add a parameter? what parameter?

And the most disturbing:
Cannot open dh1024.pem for DH parameters: error:02001002:system library:fopen:No such file or directory: error:2006D080:BIO routines:BIO_new_file:no such file

dh1024.pem is in the /etc/openvpn folder, i rebuilt it to be sure, the error is still there.

About apache, there are just simple php tests, i'm learning web programming, i don't think apache uses 443 port.
And i'm forced to use the 443 for openvpn, most of the other ports are blocked in my student room. (that's why i use a vpn)

Thanks for your answers and patience, i'm new on linux.
 
Old 08-25-2012, 08:10 PM   #4
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Quote:
What means: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: script-security ?
According to me the error message says [CMD-LINE]:1:. Can you try by commenting out the line 1 (mode server). or make sure it is correct.


for the dh1024.pem error give a full path there e.g. /etc/openvpn/dh1024.pem

Quote:
# Log
verb 3
mute 20
status openvpn-status.log
log-append /var/log/openvpn.log
replace verb 3 with verb 9. It will give your more detail about error message you can check the error log for more info. Hope it may help
 
Old 08-26-2012, 05:40 AM   #5
Anselme
LQ Newbie
 
Registered: Aug 2012
Location: Toulouse, France
Distribution: Fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
I tried everything you suggested, and nothing changed in the logs, i concluded that openvpn don't use my server.conf, then i tried launching openvpn that way:

openvpn --config /etc/openvpn/server.conf

It worked, and i can connect to the server with my openvpn client.
Everything is fine and works well, I think I will let openvpn work that way now.

You've been really helpful, thanks !
(By the way, if you have some advices to improve how my openvpn server is working, i'm listening)
 
  


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
Nslook up error in browser after configuring openvpn in ubuntu. palani13dec Linux - Networking 0 08-21-2012 05:02 AM
configuring openvpn with iptables rules (internet connection freezes when tun0 is up) BlackHawk Linux - Networking 11 06-22-2011 12:36 AM
configuring openvpn in same network (i.e client and server both are in same netwrk) eshi14 Linux - Networking 4 10-31-2009 12:46 AM
Configuring OPENVPN 2.1 towhid Linux - Networking 12 07-02-2009 03:46 AM
problems configuring Kvpnc using openvpn nielsl Linux - Networking 0 08-24-2008 08:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:06 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