[Resolved] OpenVPN First-Startup

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
HalfEatenPie
OpenVpn Newbie
Posts: 8
Joined: Tue May 08, 2012 7:27 am

[Resolved] OpenVPN First-Startup

Post by HalfEatenPie » Tue May 08, 2012 7:43 am

Hey there! Hopefully I put everything down so it's easy to understand! Also, thanks for all your help!

The Setting
I followed the Installation How-To using the Without RPM settings. yum install openVPN would say "No package openvpn available." I somehow magically stumbled on through the How-To all the way to "Starting up the VPN and testing for initial connectivity". I did hit several speed bumps (aka I might have missed some stuff previously) but most of them I was able to solve using Google.

The Goal
To get a working VPN with my laptop (I'm failing)

The Problem
This following code shows up with I run the code: openvpn server.conf

Code: Select all

<Some Configuration Information is Present Here (Available upon Request)>
Tue May  8 19:24:45 2012 us=708200   auth_user_pass_file = '[UNDEF]'
Tue May  8 19:24:45 2012 us=708208 OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [eurephia] built on May  8 2012
Tue May  8 19:24:45 2012 us=708297 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue May  8 19:24:45 2012 us=709472 Diffie-Hellman initialized with 1024 bit key
Tue May  8 19:24:45 2012 us=709678 WARNING: file 'server.key' is group or others accessible
Tue May  8 19:24:45 2012 us=710012 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0
Tue May  8 19:24:45 2012 us=710042 Socket Buffers: R=[137216->131072] S=[137216-
Tue May  8 19:24:45 2012 us=710121 ROUTE: default_gateway=UNDEF
Tue May  8 19:24:45 2012 us=710154 Note: Cannot open TUN/TAP dev /dev/net/tun: P
Tue May  8 19:24:45 2012 us=710171 /sbin/ifconfig  10.8.0.1 pointopoint 10.8.0.2
SIOCSIFADDR: Permission denied
: unknown interface: No such device
SIOCSIFDSTADDR: Permission denied
: unknown interface: No such device
SIOCSIFMTU: Operation not permitted
Tue May  8 19:24:45 2012 us=711544 Linux ifconfig failed: external program exite
Tue May  8 19:24:45 2012 us=711569 Exiting
I've tried googling up individual portions but I haven't been able to get everything working.

Hardware/Software
CentOS 6 64-bit
VPS with 2 Cores
Everything else is available upon request.

My Background
I know HTML, CSS, C++, PHP, all that jazz but SSH is where I just don't know.

Thanks for all your help! I've been working on this all night and I just can't seem to get it right.

Edit: For those of you guys who got here late, I just did a clean install. I've moved on to another problem located here: topic10537.html for those of you interested (if not that's cool too, just keeping the line flowing).
Last edited by HalfEatenPie on Sat May 19, 2012 3:43 pm, edited 1 time in total.

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: OpenVPN First-Startup

Post by maikcat » Tue May 08, 2012 9:57 am

hi there,
Tue May 8 19:24:45 2012 us=710154 Note: Cannot open TUN/TAP dev /dev/net/tun: P
try running openvpn as user root,
also epel repository has openvpn rpm.

can you also post the output of

modinfo tun

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

HalfEatenPie
OpenVpn Newbie
Posts: 8
Joined: Tue May 08, 2012 7:27 am

Re: OpenVPN First-Startup

Post by HalfEatenPie » Tue May 08, 2012 8:26 pm

Running the following code as root: openvpn server.conf
provided the output:

Code: Select all

<configure file content>
Wed May  9 08:10:57 2012 us=111219   auth_user_pass_file = '[UNDEF]'
Wed May  9 08:10:57 2012 us=111226 OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL]                                                                  [LZO2] [EPOLL] [eurephia] built on May  8 2012
Wed May  9 08:10:57 2012 us=111337 NOTE: OpenVPN 2.1 requires '--script-security                                                                  2' or higher to call user-defined scripts or executables
Wed May  9 08:10:57 2012 us=112473 Diffie-Hellman initialized with 1024 bit key
Wed May  9 08:10:57 2012 us=112658 WARNING: file 'server.key' is group or others                                                                  accessible
Wed May  9 08:10:57 2012 us=112943 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0                                                                  ET:0 EL:0 ]
Wed May  9 08:10:57 2012 us=112968 Socket Buffers: R=[137216->131072] S=[137216-                                                                 >131072]
Wed May  9 08:10:57 2012 us=113069 ROUTE: default_gateway=UNDEF
Wed May  9 08:10:57 2012 us=228010 Note: Cannot open TUN/TAP dev /dev/net/tun: N                                                                 o such device (errno=19)
Wed May  9 08:10:57 2012 us=228037 /sbin/ifconfig  10.8.0.1 pointopoint 10.8.0.2                                                                  mtu 1500
SIOCSIFADDR: No such device
: unknown interface: No such device
SIOCSIFDSTADDR: No such device
: unknown interface: No such device
SIOCSIFMTU: No such device
Wed May  9 08:10:57 2012 us=229268 Linux ifconfig failed: external program exite                                                                 d with error status: 1
Wed May  9 08:10:57 2012 us=229305 Exiting

Running modinfo tun provides:

Code: Select all

[root@chocolate sample-config-files]# modinfo tun
ERROR: modinfo: could not find module tun
Additional Note: I have already enabled TUN/TAP from the SolusVM control panel.

As for the EPEL Repo I got the RPM (I'll be testing that out later when I have more time) but is it possible to integrate the EPEL list with YUM? (I understand this is un-related to the OpenVPN problem so feel free to not answer it)

Thanks for all your help!


Edit: forgot to mention that I ran the command as root
Last edited by HalfEatenPie on Wed May 09, 2012 7:11 am, edited 1 time in total.

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: OpenVPN First-Startup

Post by maikcat » Wed May 09, 2012 7:11 am

the rpm you search is named epel-release-6-5.noarch.rpm

after you install it yum will query epel repo too...

tun module is missing (?)

Michael
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

HalfEatenPie
OpenVpn Newbie
Posts: 8
Joined: Tue May 08, 2012 7:27 am

Re: OpenVPN First-Startup

Post by HalfEatenPie » Wed May 09, 2012 7:46 am

Would you think the problem is because I could possibly be missing some important libraries/additional software OpenVPN could need?

Also, I've been looking for the EPEL .rpm file but I haven't been able to locate one. I usually end up at the repository where individual files available to the .rpm are hosted.

Also, Fedoraproject doesn't have the following file on their server (or atleast it returns a 404).

http://download.fedoraproject.org/pub/e ... noarch.rpm
The above link is bad (to my understanding atleast).

Could you please clarify by what you mean "tun module is missing (?)"

Thanks again for all your help,

Don

HalfEatenPie
OpenVpn Newbie
Posts: 8
Joined: Tue May 08, 2012 7:27 am

Re: OpenVPN First-Startup

Post by HalfEatenPie » Fri May 11, 2012 6:35 am

Hey maikcat,

I can't seem to send PMs. On another note if I want to re-do my installation is it ok if I just delete the OpenVPN folder I used? (e.g. I can currently run commands "openvpn ___" but if I delete the folder I installed OpenVPN on and tried another clean install would that be ok?).

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: OpenVPN First-Startup

Post by maikcat » Fri May 11, 2012 8:12 am

hi there,
if I just delete the OpenVPN folder I used?
btw..how did you exactly installed openvpn anyway?

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

HalfEatenPie
OpenVpn Newbie
Posts: 8
Joined: Tue May 08, 2012 7:27 am

Re: OpenVPN First-Startup

Post by HalfEatenPie » Sat May 12, 2012 2:09 am

Under the installation HowTo without the RPM. Therefore I installed it using the tar.

rashid47010
OpenVpn Newbie
Posts: 11
Joined: Tue May 15, 2012 6:13 pm

Re: OpenVPN First-Startup

Post by rashid47010 » Tue May 15, 2012 6:17 pm

hi

for your "script-security 2" put this into your server.conf file
and for certificate missing error you have to give the complete path like
ca /etc/openvpn/keys/ca.cert
same like for server.key check if it is under /etc/openvpn or under /etc/openvpn/keys

Please update if it is helpful for you




HalfEatenPie wrote:Hey there! Hopefully I put everything down so it's easy to understand! Also, thanks for all your help!

The Setting
I followed the Installation How-To using the Without RPM settings. yum install openVPN would say "No package openvpn available." I somehow magically stumbled on through the How-To all the way to "Starting up the VPN and testing for initial connectivity". I did hit several speed bumps (aka I might have missed some stuff previously) but most of them I was able to solve using Google.

The Goal
To get a working VPN with my laptop (I'm failing)

The Problem
This following code shows up with I run the code: openvpn server.conf

Code: Select all

<Some Configuration Information is Present Here (Available upon Request)>
Tue May  8 19:24:45 2012 us=708200   auth_user_pass_file = '[UNDEF]'
Tue May  8 19:24:45 2012 us=708208 OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [eurephia] built on May  8 2012
Tue May  8 19:24:45 2012 us=708297 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue May  8 19:24:45 2012 us=709472 Diffie-Hellman initialized with 1024 bit key
Tue May  8 19:24:45 2012 us=709678 WARNING: file 'server.key' is group or others accessible
Tue May  8 19:24:45 2012 us=710012 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0
Tue May  8 19:24:45 2012 us=710042 Socket Buffers: R=[137216->131072] S=[137216-
Tue May  8 19:24:45 2012 us=710121 ROUTE: default_gateway=UNDEF
Tue May  8 19:24:45 2012 us=710154 Note: Cannot open TUN/TAP dev /dev/net/tun: P
Tue May  8 19:24:45 2012 us=710171 /sbin/ifconfig  10.8.0.1 pointopoint 10.8.0.2
SIOCSIFADDR: Permission denied
: unknown interface: No such device
SIOCSIFDSTADDR: Permission denied
: unknown interface: No such device
SIOCSIFMTU: Operation not permitted
Tue May  8 19:24:45 2012 us=711544 Linux ifconfig failed: external program exite
Tue May  8 19:24:45 2012 us=711569 Exiting
I've tried googling up individual portions but I haven't been able to get everything working.

Hardware/Software
CentOS 6 64-bit
VPS with 2 Cores
Everything else is available upon request.

My Background
I know HTML, CSS, C++, PHP, all that jazz but SSH is where I just don't know.

Thanks for all your help! I've been working on this all night and I just can't seem to get it right.

HalfEatenPie
OpenVpn Newbie
Posts: 8
Joined: Tue May 08, 2012 7:27 am

Re: OpenVPN First-Startup

Post by HalfEatenPie » Sat May 19, 2012 3:42 pm

Hey thanks for your help! Just letting you know I've moved on to another post (I'll edit the title to state RESOLVED).

Thanks for your help though!

topic10537.html

Post Reply