Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a few computers that I need to connect to a VPN. Right now, I have to manually check to see what IP address the VPN assigned each computer so that I can SSH into each later. Ideally, it would be better if each computer logged onto the network with a given host name. Is this possible, or something like this, to do with PPTP or another VPN?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Use different username in PPTP client configuration in each computer to connect to pptpd server. And then in /etc/ppp/chap-secrets you can map username to IP address as following.

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
user1           pptpd   pass1                    192.168.1.10
user2           pptpd   pass2                    192.168.1.11

The fourth column assigns static IP address to the user in column 1. Now though you cannot use hostname, at least you have fix IP address for each computer. So you do not have to check IP address of the computers manually.

OR if you have local DNS server available,

Then you add A records for each computer in your local DNS server to point hostname to the static IP address you have assigned for the computer in chap-secrets file.

share|improve this answer
    
nice. Good idea. –  Scoop Dec 23 '12 at 5:50
    
So the fist option sounds good. The second one is intriguing as well. For the second option, would I have to run a local DNS on the server? Could you recommend a good one? How would the clients then register with the local DNS or would that have to be done by hand? –  Scoop Dec 23 '12 at 6:47
    
You can use bind ideally if you really want to have a DNS server setup. By googling you can get many references for the same. –  Sachin Divekar Dec 26 '12 at 19:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.