LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-30-2009, 06:20 AM   #1
threaderslash
Member
 
Registered: Dec 2008
Location: HongKong
Distribution: Fedora/Centos/RedHat
Posts: 115

Rep: Reputation: 15
Cool OpenVPN : Requisites / How To


Hi Guys!

I need some help here with OpenVPN in order to put it runing a remote network connection. It involves client-server work that I am doing from home: Client Linux (my notebook) -- Server Windows. In my notebook I have installed a tri-boot with FC/Suse/Solaris.

So, to put VPN to connect properly it requires TUN/TAP driver. Then, when I run...

# openvpn --mktun
Options error: You must define TUN/TAP device (--dev)

Any directions are mostly appreciated!

PS: My boss is suggesting me to just forget linux, and install instead Windows OS on my notebook. Anyway, I am a fan of linux, and at least in my home we got completely rid of windows thing yet for one year -- and I wish things keep this way.
 
Old 06-30-2009, 06:36 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
So try

openvpn --mktun --dev tun0
 
Old 06-30-2009, 06:56 AM   #3
threaderslash
Member
 
Registered: Dec 2008
Location: HongKong
Distribution: Fedora/Centos/RedHat
Posts: 115

Original Poster
Rep: Reputation: 15
Cool

thanks... as you suggested

# openvpn --mktun --dev tun0
Tue Jun 30 21:58:11 2009 TUN/TAP device tun0 opened
Tue Jun 30 21:58:11 2009 Persist state set to: ON

but my VPN is still not connecting.
 
Old 06-30-2009, 07:05 AM   #4
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
Dear pls go through this link and i hope it will resolve ur problem related to openvpn.
http://openvpn.net/index.php/open-so...ion/howto.html
 
Old 06-30-2009, 09:07 AM   #5
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
I am connected to my work's openvpn, using the openvpn plugin for Network Manager (NetworkManager-openvpn) and it was easy to setup a vpn connection using Network Manager. Try it !
 
Old 06-30-2009, 07:35 PM   #6
threaderslash
Member
 
Registered: Dec 2008
Location: HongKong
Distribution: Fedora/Centos/RedHat
Posts: 115

Original Poster
Rep: Reputation: 15
Cool

Hi VAP, Thanks for the link.... but it was offline.
 
Old 06-30-2009, 08:04 PM   #7
threaderslash
Member
 
Registered: Dec 2008
Location: HongKong
Distribution: Fedora/Centos/RedHat
Posts: 115

Original Poster
Rep: Reputation: 15
Cool

Hi Marozsas, thanks for the feeback.

I am trying my connection using FC10.
yesterday at the end of the day, I tried this:

# openvpn --mktun --dev tun0
Tue Jun 30 21:58:11 2009 TUN/TAP device tun0 opened
Tue Jun 30 21:58:11 2009 Persist state set to: ON

I have also done on FC10: system --> preferences --> internet and network --> network connections --> VPN

choose the option: VPN Connection 1 [x] connect automatically.
Gateway: the remote server IP
Authentication type: password
User name: admID
CA certificate

IPv4 Method: Automatic VPN.

Then I tried my IP to see the OpenVPN admin:
https://111.222.1.33:8443/admin
Then it gives me: Firefox can't establish a connection to the server at. Yesterday it was connecting with the OpenVPN control panel.

Then I try to connect remotely, and it does not work. Maybe it is just some missing twig. Any other suggestion?
 
Old 07-02-2009, 07:33 PM   #8
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
To successfully configure a VPN connection you need to know a few things about the server side.
I don't known about yours, but mine give to the clients two files: a configuration file and a PKSC#12 file. Using it on command line looks like this:
Code:
openvpn --config myvpn.ovpn --script-security 2
On the config file there are settings for the type of vpn connection (TLS, password based, static keys, etc), if it uses a TUN or TAP interface, if it runs over TCP or over UDP (most common case), the MTU, the port on the remote end (where the server is listening to), what cypher is used to encrypt the data, and what kind of compression is used. The config file has the name of the PKCS#12 file too. The p12 file have the certificates for CA, for the user and the key used to cypher/protect this data.

If you are trying with NetworkManager-openvpn module it is easy (kind of) to fill the blanks when you setup a new VPN connection. You must fill the fields on the main window and the General and Security tabs on the Advanced window. They are all the above and you need to get the details with your system administrator.

Start with the command line as root using the config file and the PKCS#12 file.
When using Network Manager there are issues due to constrains imposed by SELinux. For test purpose only - disable SELinux and re-enable and fix it later.

Of course, I suppose your openVPN is TLS based. If is not, I am afraid I can't help much more, since I don't have any experience with static keys and password based is too insecure to anyone use it in nowadays.

I started a thread about his subject a while ago in this same forum about using NM-opvn and Zerina/Smoothwall server.

I hope this can help you.
 
  


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 client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
Pre-requisites for hardware device programmer just.srad Linux - General 2 09-29-2008 07:31 PM
MISSING REQUISITES : rsct.core.sensorrm 2.3.0.0 # Base Level Fileset Liquidx AIX 2 10-14-2007 01:30 AM
OpenVPN Question : connecting 5-6 comps with OpenVPN duryodhan Linux - Networking 7 02-15-2007 10:28 PM
OpenVPN Voyager_MP Linux - Networking 0 07-09-2004 04:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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