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?
Asked
Active
Viewed 1,463 times
1 Answers
2
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.
![](../../users/profiles/101167.webp)
Sachin Divekar
- 2,445
- 2
- 20
- 23
-
nice. Good idea. – Scoop Dec 23 '12 at 05: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 06: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