Home > How To's, SysAdmin > HowTo Setup VPN Server On Debian 5.0 Lenny

HowTo Setup VPN Server On Debian 5.0 Lenny


This post is been migrated to – INITCRON.org

Setting Up VPN Server On Debian 5.0 Lenny

1. Install pptpd
apt-get install pptpd

2. Enable IP Forwarding

edit /etc/sysctl.conf, uncomment following
#net.ipv4.ip_forward=1

3. Configure pptpd
Edit /etc/pptpd.conf
Add local ip (server’s ip) and remote ips (range of ips which can be offered to clients)
e.g.
localip 10.0.0.1
remoteip 10.0.0.21-40,10.0.0.51

4. Configure DNS Servers
Edit /etc/ppp/pptpd-options
Add dns servers to ms-dns
e.g.
ms-dns 125.17.130.129
ms-dns 208.91.169.198

5. Add Users Authentication to /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client    server    secret            IP addresses
test        pptpd    test            *

6. Restart pptp daemon
/etc/init.d/pptpd restart

7. Open  tcp  port  1723 on your router/firewall to be able to  connect to the vpn server from the world.

8.  Test Connection

Advertisements
  1. December 16, 2009 at 4:00 pm

    Hi !

    Thanks for this very helpful tutorial ! I’ve done everything as you said, and it almost works. But when i’m trying to connect my mac to my server, i have this problem ( http://www.debianhelp.org/node/11630 ).

    I really can’t authentificate, do you have an idea ?

    Thanks for your help 🙂

    Bastien

  2. petros
    April 3, 2010 at 11:36 pm

    you forgot “/etc/ppp/chap-secrets
    ” in step Add Users Authentication 😉

  3. Lars K
    April 8, 2010 at 1:39 pm

    You forgot info about which file to edit in #5:

    5. Add Users Authentication

    Edit the file /etc/ppp/chap-secrets
    # Secrets for authentication using CHAP
    # client server secret IP addresses
    test pptpd test *

  4. Gourav Shah
    April 8, 2010 at 2:13 pm

    Thanks Petros and Lars, I have updated #5

  5. April 22, 2010 at 6:21 pm

    I’d got some strange error:

    Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
    pptpd-logwtmp: $Version$
    using channel 45
    Using interface ppp0
    Connect: ppp0 /dev/pts/2
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x0 ]
    sent [LCP ConfAck id=0x0 ]
    rcvd [LCP ConfReq id=0x1 ]
    sent [LCP ConfAck id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x2 ]
    sent [LCP ConfAck id=0x2 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x3 ]
    sent [LCP ConfAck id=0x3 ]
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x4 ]
    sent [LCP ConfAck id=0x4 ]
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x5 ]
    sent [LCP ConfAck id=0x5 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x6 ]
    sent [LCP ConfAck id=0x6 ]
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x7 ]
    sent [LCP ConfAck id=0x7 ]
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfReq id=0x8 ]
    sent [LCP ConfAck id=0x8 ]
    LCP: timeout sending Config-Requests
    Connection terminated.
    Modem hangup

  6. Andres
    April 30, 2010 at 10:45 pm

    8?

  7. Ankit
    May 1, 2010 at 8:55 am

    thanks to u for guide the above lines. but cn u help me how to connect two or more racoon clients through this pptp server. also i would like to ping host to host of different racoon clients and also host of pptp server.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: