LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-27-2012, 02:46 PM   #1
Jodel
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Rep: Reputation: 0
Resolve VPN client hostnames using Bind


I have a number of VPN clients connecting to a Ubuntu 12.04 server (This was set up using Zentyal 3.0). I need to connect many more.
I would like to be able to address the clients from the server by hostname.
The Openvpn server gives all the clients IPs in the 196.168.160.0/24 range. The Server running Openvpn has a 192.168.1.20 address.
The DNS server is up and running but it does not resolve the host names of the clients on the VPN.

How can I set up the DNS on the server so that I can ping, ssh etc., and connect to the Clients by hostname, from the server, rather than by IP address.
Thanks,
Jodel
 
Old 10-27-2012, 07:34 PM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
Do you just want to be able to use generic names like 'host001', 'host002', etc, or do you want specific host names for each machine? The later is not going to be possible unless you're assigning the same IP to the same machine every time.

Are you asking how to set up BIND in general or something more specialized to this situation? Please clarify.
 
Old 10-28-2012, 02:45 AM   #3
Jodel
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for your reply. I have Bind set up and working as a caching dns server for all the machines on the local net 192.168.0/24.
The external machines that connect via Openvpn are all linux machines with hostnames.
They connect to Openvpn, but the same machine could come from a different external ip each time it connects
Openpenvpn assigns them ip numbers. 192.168.160.2, 3, 4, 5, etc on the basis of order of connection and next available number. As the external could be .5 the first connection and .7 the next time, is there any way of linking the actual host name of the external machine to the ip allocated by Bind such that I can for example ssh to the client from the server on the basis of the clients host name?
Hope I have made the question clearer?
Jodel
 
Old 10-28-2012, 03:10 AM   #4
Jodel
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Just another thought. If Ovenvpn could allocate the same ip each time to the same connection name this would resolve the problem. Can that be done?
Jodel
 
Old 10-28-2012, 01:44 PM   #5
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
Quote:
Originally Posted by Jodel View Post
Just another thought. If Ovenvpn could allocate the same ip each time to the same connection name this would resolve the problem. Can that be done?
Jodel

http://openvpn.net/index.php/open-so...to.html#policy

It gets a little complicated, but OpenVPN can do this.

You'll identify each machine though the way it authenticates, since they could be coming from different IP addresses at different times.

Once the IPs are only being assigned to specific machines, you can set up a zone file for the subnet and have your desired result. (Don't forget reverse DNS.)
 
Old 10-28-2012, 05:50 PM   #6
Jodel
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for that. I will try that approach.
Jodel
 
  


Reply

Tags
bind9, clients, dns, hostname, openvpn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Resolve hostnames to IP veeruk101 Linux - Networking 2 04-14-2007 11:40 PM
Can't resolve hostnames Emma77 Debian 12 08-02-2006 04:31 PM
BIND doesn't resolve hostnames information for which is stored on other DNS servers GD_19 Linux - Networking 5 01-03-2006 08:31 PM
Problem with BIND - Can't resolve hostnames unless listen-on is set to the IP range GD_19 Linux - Networking 2 07-07-2005 04:56 PM
Can't resolve hostnames....need help shaggystyle Linux - Networking 2 08-28-2004 02:20 AM


All times are GMT -5. The time now is 06:23 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration