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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-25-2012, 04:45 AM
|
#1
|
LQ Newbie
Registered: Aug 2012
Location: Toulouse, France
Distribution: Fedora
Posts: 3
Rep: 
|
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.
|
|
|
08-25-2012, 08:19 AM
|
#2
|
Member
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347
Rep:
|
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.
|
|
|
08-25-2012, 03:58 PM
|
#3
|
LQ Newbie
Registered: Aug 2012
Location: Toulouse, France
Distribution: Fedora
Posts: 3
Original Poster
Rep: 
|
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.
|
|
|
08-25-2012, 08:10 PM
|
#4
|
Member
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347
Rep:
|
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
|
|
|
08-26-2012, 05:40 AM
|
#5
|
LQ Newbie
Registered: Aug 2012
Location: Toulouse, France
Distribution: Fedora
Posts: 3
Original Poster
Rep: 
|
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)
|
|
|
All times are GMT -5. The time now is 10:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|