RSS



Go Back   bit-tech.net Forums > Technology > Software

Reply
 
Thread Tools
Old 10th Apr 2007, 10:38   #1
RTT
Orange power
Moderator
 
RTT's Avatar
 
Join Date: Mar 2001
Location: Berkshire
Posts: 13,051
RTT is a jewel in the roughRTT is a jewel in the roughRTT is a jewel in the roughRTT is a jewel in the rough
VPN Server on Ubuntu Tutorial

We use Ubuntu here on our internal development servers (apt-get love ) and this morning I needed to setup a VPN server so that I can access some tools that run here from home. I came across a bunch of hurdles and thought i'd document them here for anyone who needs to do the same.

This will allow MS clients and probably Apple too.

Firstly install pptpd

Code:
sudo apt-get install pptpd
Now edit pptpd's config (/etc/pptpd.conf). At the bottom you'll find settings for localip and remoteip. Here's what mine looks like:

Code:
localip 172.198.1.4
remoteip 172.198.2.50-51
localip is the IP of an adapter in the server (yours might be 192.168.0.10 for example)
remoteip: the IPs that clients are allowed to use (i allowed mine to use 172.198.2.50 through 172.198.2.51)

Now we'll set up some users, so edit the chap-config config file(/etc/ppp/chap-secrets). I want to allow two users, so my chap-secrets file looks like this:

Code:
# client        server  secret                  IP addresses
rich             pptpd   apassword                80.40.0.0/13
geoff             pptpd   apassword                212.219.0.0/14
... which allows users rich and geoff, with the passwords 'apassword' to be accepted from those IP subnets. * can be used to allow all IPs. see pppd/chap-secrets man page for more info

You may be good to go at this point. Restart pptpd (sudo /etc/init.d/pptpd restart) and attempt to connect. If it doesn't work, check /var/log/messages for a notice that looks a bit like this:

Code:
Apr 10 09:49:42 beryllium pppd[9619]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so is for pppd version 2.4.3, this is 2.4.4
If you see that, then we need to change pptpd-logwtmp's version number.

This info kindly lifted from CyberAngel at the Ubuntuforums.

We now need a few more things:

Code:
sudo apt-get install libwrap0-dev debhelper
sudo apt-get source pptpd
cd pptpd-1.3.0/plugins
sudo vim patchlevel.h
Change:
Code:
#define VERSION         "2.4.3"
To:
Code:
#define VERSION         "2.4.4"
Save the file and now do:

Code:
cd ../..
sudo apt-get -b source pptpd
sudo dpkg -i pptpd_1.3.0-1ubuntu1_i386.deb
sudo dpkg -i bcrelay_1.3.0-1ubuntu1_i386.deb
Done! Now restart pptpd:

Code:
sudo /etc/init.d/pptpd restart
And you should be good to go!

All you need to do now is add a VPN network connection and connect with the username/password that you set up. Don't forget to hit the IPv4 TCP/IP settings on your client machines for the VPN connection and to untick "Use default gateway on remote network" if you need to (you probably will).

You will also need to change some security settings (image):

VPN Connection > Properties > [Security Tab] -> Advanced

Allow these protocols: (tick) Microsoft CHAP Version2
__________________
This post is non-negotiable. All terms and conditions apply.
Arguing on the internet is like competing in the special Olympics. Even if you win you're still a retard.
RTT is offline   Reply With Quote
Old 30th Jan 2008, 15:37   #2
Millusdk
Multimodder
 
Join Date: Jan 2008
Location: Denmark
Posts: 132
Millusdk is on a distinguished road
Hi RTT.
I like your guide on how to make a PPTP network. I followed your guide, and had no problems in setting up everything, however when i connect to my VPN server i get limited connection, and i am not able to access the website on my server if i call its remote address. Could you please help me? I am using Windows Vista by the way.
Millusdk is offline   Reply With Quote
Old 3rd May 2008, 14:52   #3
SpaceAge
What's a Dremel?
 
Join Date: May 2008
Posts: 1
SpaceAge is on a distinguished road
Hangs at Starting PPTP Daemon:

I've been trying to follow this, but am getting close towards the beginning...

When trying to install the pptpd package, it just sits at "Starting PPTP Daemon: ", and doesn't go beyond that unless I interupt it. Any idea why it's stopping here?

Thanks
SpaceAge is offline   Reply With Quote
Old 27th Jul 2008, 11:41   #4
msilfver
What's a Dremel?
 
Join Date: Jul 2008
Posts: 1
msilfver is on a distinguished road
Hangs at Starting PPTP Daemon:

Make sure the config files has a line feed at the end.
If that doesn't work, try the debug option in pptpd.conf.

Last edited by msilfver; 27th Jul 2008 at 11:53.
msilfver is offline   Reply With Quote
Old 30th Dec 2008, 11:02   #5
nathan3011
What's a Dremel?
 
Join Date: Dec 2008
Posts: 1
nathan3011 is on a distinguished road
When trying to install the pptpd package, it just sits at "Starting PPTP Daemon: ", and doesn't go beyond that unless I interupt it. Any idea why it's stopping here?

I have the exact same problem as this guy was having and i've tried the steps to help that were posted:

Make sure the config files has a line feed at the end.
If that doesn't work, try the debug option in pptpd.conf.

but it still hasn't worked is there any other way in which you could think that i can get Small Business Insurance to get passed this step?? Thanks in advance!

Last edited by nathan3011; 11th Mar 2009 at 15:50.
nathan3011 is offline   Reply With Quote
Old 30th Dec 2008, 17:24   #6
HVJoel
What's a Dremel?
 
Join Date: Dec 2008
Posts: 1
HVJoel is on a distinguished road
Port

Hi,

I've completed the tutorial. I remain with one problem though: the default pptpd port 1723 is already in use. Is there a way to change this port?

Thx in advance
HVJoel is offline   Reply With Quote
Old 30th Dec 2008, 17:44   #7
Ghys
Custom User Title
 
Ghys's Avatar
 
Join Date: Jan 2002
Location: Montreal, Canada
Posts: 2,988
Ghys is a glorious beacon of lightGhys is a glorious beacon of lightGhys is a glorious beacon of lightGhys is a glorious beacon of lightGhys is a glorious beacon of light
four first posts in a row ! Damn , your howTo gets you love RTT !
__________________
I have to say you cheesecake dislikers suck serious balls - Krikkit
Ghys is offline   Reply With Quote
Old 1st Dec 2009, 01:08   #8
GahocIT
What's a Dremel?
 
Join Date: Dec 2009
Posts: 1
GahocIT is on a distinguished road
Thank for TUT
And now I have a question
Save the file and now do:

Code:

Quote:
cd ../..
sudo apt-get -b source pptpd
sudo dpkg -i pptpd_1.3.0-1ubuntu1_i386.deb
sudo dpkg -i bcrelay_1.3.0-1ubuntu1_i386.deb
it is error

Could you tell me why error in line ?
Build command 'cd pptpd-1.3.4 && dpkg-buildpackage -b -uc' failed.
E: Child process failed

Last edited by GahocIT; 1st Dec 2009 at 04:01.
GahocIT is offline   Reply With Quote
Old 8th Dec 2009, 06:16   #9
sanjeevani
What's a Dremel?
 
Join Date: Dec 2009
Posts: 1
sanjeevani is on a distinguished road
How will vpn software affect your internet speed? I want to subscribe to the world-secure channel vpn software.They give you the option of taking an account that costs $80 per year and then the speed is 512 kbps.The other option is $120 and then you have unlimited speed.Will the 512 kbps be enough or should i go for the unlimited speed?I live in the UAE and I have a 2mbps speed account.
___________________
keyword research ~ keyword tool ~ keyword tracking ~ affiliate elite

Last edited by sanjeevani; 11th Dec 2009 at 11:27.
sanjeevani is offline   Reply With Quote
Reply

Tags
linux

Thread Tools

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 16:59.
Powered by: vBulletin Version 3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.