LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-20-2013, 11:11 PM   #1
sohailkmu
Member
 
Registered: Oct 2008
Posts: 82
Blog Entries: 1

Rep: Reputation: 15
Configuration of VPN Server in Centos


Dear All,

I have been given an assignment about configuring vpn on my university network.

The purpose is to allow a remote user to use internet on my university's network as certain websites are only accessible through university network.

Thanks
 
Old 01-21-2013, 12:46 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Sections 42.7, 42.8, 42.9 http://www.linuxtopia.org/online_boo...ion/index.html
 
Old 01-21-2013, 12:50 AM   #3
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
you need to enable repoforge or EPEL
then yum install openvpn
 
Old 01-21-2013, 05:27 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sohailkmu
I have been given an assignment about configuring vpn on my university network. The purpose is to allow a remote user to use internet on my university's network as certain websites are only accessible through university network.
If you've been put in charge of a VPN solution for a university, are you not able to do basic research on your own, or ask a clear, complete question? You don't say anything about version/distro of Linux, how many clients (and what OS THEY are going to run), resources, etc. If you have a specific question, please post it, and we'll be happy to help...but we can't/won't look things up for you.

Quote:
Originally Posted by routers View Post
you need to enable repoforge or EPEL
then yum install openvpn
...which will only work if the OP is using RHEL or a derivative. Yum doesn't work on all distros, and enabling the repositories you mentioned could HARM systems with bad info, if they're not compatible.
 
Old 01-21-2013, 11:10 PM   #5
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
Dear TBone
Ops already mention centos in topic
that's why i give him yum installed
want to see what he want to reply , because in my mind
he didnt have the system with him

Quote:
Originally Posted by TB0ne View Post
If you've been put in charge of a VPN solution for a university, are you not able to do basic research on your own, or ask a clear, complete question? You don't say anything about version/distro of Linux, how many clients (and what OS THEY are going to run), resources, etc. If you have a specific question, please post it, and we'll be happy to help...but we can't/won't look things up for you.


...which will only work if the OP is using RHEL or a derivative. Yum doesn't work on all distros, and enabling the repositories you mentioned could HARM systems with bad info, if they're not compatible.
 
Old 01-21-2013, 11:21 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by routers View Post
Dear TBone
Ops already mention centos in topic
that's why i give him yum installed
want to see what he want to reply , because in my mind
he didnt have the system with him
But, that's not the point....
 
Old 01-21-2013, 11:49 PM   #7
sohailkmu
Member
 
Registered: Oct 2008
Posts: 82

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by TB0ne View Post
If you've been put in charge of a VPN solution for a university, are you not able to do basic research on your own, or ask a clear, complete question? You don't say anything about version/distro of Linux, how many clients (and what OS THEY are going to run), resources, etc. If you have a specific question, please post it, and we'll be happy to help...but we can't/won't look things up for you.


...which will only work if the OP is using RHEL or a derivative. Yum doesn't work on all distros, and enabling the repositories you mentioned could HARM systems with bad info, if they're not compatible.
Dear Sir,

Sorry for my vague question. In my question I mentioned that I am using CentOS Linux 5.5. What I need is to allow a remote user to browse certain web sites which are only accessible on the university's network. My problem is I dont have Public IP. However, In my DSL router I can do it through port forwarding.

My remote users will be using Windows xp/vista/7.

I once again apologize for making you angry.

Thanks
 
Old 01-22-2013, 02:30 AM   #8
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
Dear Ops
nobody is angry actually, this normal behavior for us
btw anything mentioned is very important to look , more specific is more better

and now you're mentioned you dont have public IP , visit http://www.noip.com/
this could settle domain issue
 
Old 01-22-2013, 09:03 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sohailkmu
Sorry for my vague question. In my question I mentioned that I am using CentOS Linux 5.5.
No, you didn't. The subject of your question says CentOS. You never mentioned what version until now.
Quote:
What I need is to allow a remote user to browse certain web sites which are only accessible on the university's network. My problem is I dont have Public IP. However, In my DSL router I can do it through port forwarding.

My remote users will be using Windows xp/vista/7.
If your DSL router can do port-forwarding, then forward ports to different websites internally. No need to use a VPN. If you want security, then yes, you'll have to install/configure a VPN server. Again, there are MANY how-to documents you can easily find about how to configure various VPN systems. Follow them. Again, just putting "configure openvpn on centos" into Google brings up lots, like this:
http://duncanbrown.org/index.php/OpenVPN_With_CentOS
Quote:
I once again apologize for making you angry.
No one is angry, but do realize that when you say you're in charge of a project at a university, then don't ask a clear question, provide details, or do ANY research on your own, it's not a good way to get help. If someone walked up to you in your job at the university and said "My computer doesn't work...what's wrong with it?", would you be able to help them, based on that question, or would you have to ask for details??
Quote:
Originally Posted by routers View Post
Dear TBone
Ops already mention centos in topic that's why i give him yum installed want to see what he want to reply , because in my mind he didnt have the system with him
At the time, the OP didn't mention what VERSION of CentOS, so those repositories may or may not be a good thing. And until you know what version of CentOS, you don't know which repository to add. Version 5 is different from 6:
http://www.rackspace.com/knowledge_c...entos-5x-or-6x
 
Old 01-30-2013, 01:48 AM   #10
sohailkmu
Member
 
Registered: Oct 2008
Posts: 82

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by TB0ne View Post
No, you didn't. The subject of your question says CentOS. You never mentioned what version until now.

If your DSL router can do port-forwarding, then forward ports to different websites internally. No need to use a VPN. If you want security, then yes, you'll have to install/configure a VPN server. Again, there are MANY how-to documents you can easily find about how to configure various VPN systems. Follow them. Again, just putting "configure openvpn on centos" into Google brings up lots, like this:
http://duncanbrown.org/index.php/OpenVPN_With_CentOS

No one is angry, but do realize that when you say you're in charge of a project at a university, then don't ask a clear question, provide details, or do ANY research on your own, it's not a good way to get help. If someone walked up to you in your job at the university and said "My computer doesn't work...what's wrong with it?", would you be able to help them, based on that question, or would you have to ask for details??

At the time, the OP didn't mention what VERSION of CentOS, so those repositories may or may not be a good thing. And until you know what version of CentOS, you don't know which repository to add. Version 5 is different from 6:
http://www.rackspace.com/knowledge_c...entos-5x-or-6x
Dear All,

I have tried my level best to configure OpenVPN both on Centos 5.7 and windows 7 but no luck. Initially I followed How tos from openvpn.net site. kindly give me links from where I can get detail step by step tutorials covering every aspect of open vpn.

Thanks
 
Old 01-30-2013, 02:00 AM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Did you read my link in post #2 ?
 
Old 01-30-2013, 08:55 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sohailkmu View Post
Dear All,
I have tried my level best to configure OpenVPN both on Centos 5.7 and windows 7 but no luck. Initially I followed How tos from openvpn.net site. kindly give me links from where I can get detail step by step tutorials covering every aspect of open vpn.
You can't 'initially' follow the instructions...you have to follow ALL of the instructions. And again, you don't provide details...what steps did you follow? What error(s) did you get? When did you get them??? Just saying "no luck", tells us nothing.

You've been given two links, with VERY clear how-to guides. If you want more links, then go to Google and look a few more up.
 
Old 02-12-2013, 11:40 PM   #13
sohailkmu
Member
 
Registered: Oct 2008
Posts: 82

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by TB0ne View Post
You can't 'initially' follow the instructions...you have to follow ALL of the instructions. And again, you don't provide details...what steps did you follow? What error(s) did you get? When did you get them??? Just saying "no luck", tells us nothing.

You've been given two links, with VERY clear how-to guides. If you want more links, then go to Google and look a few more up.
Dear Sir,

I m very sorry for asking stupid questions. I have gone through your links. Open VPN Client End log is given below
Wed Feb 13 10:29:27 2013 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006
Wed Feb 13 10:29:27 2013 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Wed Feb 13 10:29:27 2013 LZO compression initialized
Wed Feb 13 10:29:27 2013 UDPv4 link local: [undef]
Wed Feb 13 10:29:27 2013 UDPv4 link remote: mystaticip:1194
Wed Feb 13 10:29:32 2013 [server] Peer Connection Initiated with mystaticip:1194
Wed Feb 13 10:29:33 2013 TAP-WIN32 device [Local Area Connection 2] opened: \\.\Global\{16D7F9CA-DC44-4C0C-9C73-0F3FB09E9B11}.tap
Wed Feb 13 10:29:33 2013 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.8.0.4/255.255.255.0 on interface {16D7F9CA-DC44-4C0C-9C73-0F3FB09E9B11} [DHCP-serv: 10.8.0.0, lease-time: 31536000]
Wed Feb 13 10:29:33 2013 Successful ARP Flush on interface [24] {16D7F9CA-DC44-4C0C-9C73-0F3FB09E9B11}
Wed Feb 13 10:30:03 2013 Warning: route gateway is not reachable on any active network adapters: 172.16.2.12
Wed Feb 13 10:30:03 2013 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )

My clinet.ovpn is given below

client

dev tap

#dev-node MyTAP #If you renamed your TAP interface or have more than one TAP interface then remove the # at the beginning and change "MyTAP" to its name

proto udp

remote mystaticip 1194 #You will need to enter you dyndns account or static IP address here. The number following it is the port you set in the server's config

#remote 172.16.2.12 1194
#route 172.16.2.1 255.255.0.0 vpn_gateway 3 #This it the IP address scheme and subnet of your normal network your server is on. Your router would usually be 192.168.1.1
route 172.16.2.0 255.255.0.0 172.16.2.12 3
resolv-retry infinite

nobind

persist-key

persist-tun

ca "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"

cert "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\client1.crt" # Change the next two lines to match the files in the keys directory. This should be be different for each client.

key "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\client1.key" # This file should be kept secret

ns-cert-type server

cipher BF-CBC # Blowfish (default) encrytion

comp-lzo

verb 1

Kindly help me. I have made settings in my dsl router through port forwarding. My open vpn server is installed on 172.16.2.12. My router local ip is 172.16.2.1. As for as I understand I am facing problems with gateway.

Thanks
 
Old 02-13-2013, 08:47 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sohailkmu View Post
Dear Sir,
I m very sorry for asking stupid questions. I have gone through your links. Open VPN Client End log is given below
Wed Feb 13 10:30:03 2013 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )

Kindly help me. I have made settings in my dsl router through port forwarding. My open vpn server is installed on 172.16.2.12. My router local ip is 172.16.2.1. As for as I understand I am facing problems with gateway.
Ok...again, did you read the information you have on hand? Did you understand the messages you got??? You posted this:
Quote:
Originally Posted by sohailkmu
Wed Feb 13 10:30:03 2013 Warning: route gateway is not reachable on any active network adapters: 172.16.2.12
Wed Feb 13 10:30:03 2013 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )
See the bolded parts? If you go to the link that the program gave you, (which references DHCP), it tells you whats going on:
http://openvpn.net/index.php/open-so...s-clients.html
...which takes you to:
http://support.microsoft.com/kb/311218

Did you read/understand those documents, and try the workarounds/solutions provided there????

Last edited by TB0ne; 02-13-2013 at 08:49 AM.
 
  


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
Setting up L2TP over IPSec VPN server under CentOS 5.3 fantasygoat Linux - Networking 6 01-12-2016 03:41 AM
L2TP VPN Server on Centos vahab Linux - Server 1 12-23-2012 04:52 AM
CentOS x64 VPN server trscookie Linux - Networking 7 12-27-2010 12:14 AM
CentOS VPN Server k_oudom Linux - Server 6 01-14-2010 03:27 AM
Linux Client Configuration for MS VPN Server friendklay Linux - Networking 0 01-31-2003 03:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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