LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2010, 02:53 PM   #1
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
extended user & IP management with OpenVPN


Hi everyone,

I am looking into OpenVPN because I need to configure a heavily firewalled network for remote access.

I have configured OpenVPN before, however not for this kind of extensive network usage (just to connect to a single LAN).

What I want to do is the following:

There are two user groups: staff and guests. Guests can access the 10.1.0.0/16 IP range, staff both the 10.0.0.0/16 and the 10.1.0.0/16 ranges. I want to create two certificates: one for the staff one for guests respectively.

In pseudo-syntax, something like this:

Code:
group staff {
     identified by certificate "staff.crt"
     server 10.8.0.0 255.255.255.0
     push route 10.0.0.0/16
     push route 10.1.0.0/16
}

group guests {
     identified by certificate "guest.crt"
     server 10.8.1.0 255.255.255.0
     push route 10.1.0.0/16
}
All I can find on the OpenVPN site is how to configure OpenVPN to server a dynamic IP range to a user group and then assign individual IPs on a certificate basis (staff1, staff2, etc) using the client-config-dir. But there seems to be no documented way to create two separate pools.

Since I want to avoid running two different OpenVPN servers to handle the two user groups, I wanted to ask around if someone has a solution for this.

thx
 
Old 08-27-2010, 12:19 PM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
FYI:
Quote:
# To assign specific IP addresses to specific
# clients or if a connecting client has a private
# subnet behind it that should also have VPN access,
# use the subdirectory "ccd" for client-specific
# configuration files (see man page for more info).

# EXAMPLE: Suppose the client
# having the certificate common name "Thelonious"
# also has a small subnet behind his connecting
# machine, such as 192.168.40.128/255.255.255.248.
# First, uncomment out these lines:
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248

# Then create a file ccd/Thelonious with this line:
# iroute 192.168.40.128 255.255.255.248
# This will allow Thelonious' private subnet to
# access the VPN. This example will only work
# if you are routing, not bridging, i.e. you are
# using "dev tun" and "server" directives.

# EXAMPLE: Suppose you want to give
# Thelonious a fixed VPN IP address of 10.9.0.1.
# First uncomment out these lines:
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
# Then add this line to ccd/Thelonious:
# ifconfig-push 10.9.0.1 10.9.0.2
 
Old 08-28-2010, 09:04 AM   #3
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Original Poster
Rep: Reputation: 32
Thanks for the reply quanta, but this excerpt from the sample config does what I mentioned above.

Supposing I have given the server the following directive:

client-config-dir ccd

Code:
server 10.9.0.0 255.255.0.0 #This would create an address pool for all connecting clients
route 10.9.0.0 255.255.255.252 #Route this subnet over VPN (info for the server)
Now Adding the following line to the Thelonius config

Code:
ifconfig push 10.9.0.1 10.9.0.2 #Push a single IP to Thelonious (must be taken from successive /30 subnets)
would assign the vpn client connecting with Thelonius's certificate that one IP Address. Not a pool. So there can be no two Clients using the Thelonious certificate at the same time without conflict.

I want a dynamic IP pool per client.
 
  


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 assigning public & static IPs to pcs/devices behind an OpenVPN client dgonzalezh Linux - Networking 6 07-18-2010 09:50 AM
OpenVPN management Port 7505 problem turiyain Linux - Server 2 06-27-2010 11:27 PM
putting extended hda into /etc/mtab & /etc/fstab tomolesonjr Linux - Hardware 6 04-05-2006 12:07 PM
extended user rights in multiple groups keex Linux - Security 2 03-15-2006 08:22 PM
How to make sound works on FreeBSD & mount extended partition & ATI radeon driver Ninja_212 *BSD 3 11-02-2004 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:21 PM.

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