Skip to main content

PPTP Server for Linux

Debian pptpd HOWTO

by James Cameron
2007-11-12

These are instructions for installing a PPTP server on Debian GNU/Linux. We last tested this with Debian Sarge packages pptp_1.2.1-2 and ppp_2.4.2+20040428-5.

Contents:


Installing MPPE Support

Most people want their tunnels encrypted. Check the version of your kernel; if it is below 2.6.15-rc1 then you do not have MPPE support. To check further, test like this:

# modprobe ppp-compress-18 && echo success

If this fails, follow the Debian MPPE HOWTO, then return here.


Installing the Server Program

Install the pptpd package from the Debian Project:

# apt-get install pptpd


Configure IP Address Range

Edit the file /etc/pptpd.conf for the IP address range, for example:

localip 192.168.0.1
remoteip 192.168.0.234-238,192.168.0.245

Note: see pptpd.conf(5) for more details on the other options.

Note: you will need to restart pptpd to make changes to /etc/pptpd.conf effective:

# /etc/init.d/pptpd restart


Adding Users

Configure /etc/ppp/chap-secrets for the accounts, for example:

# echo "username pptpd password *" >> /etc/ppp/chap-secrets

Note: this method has all the usernames in one file. There are other ways, including authentication using Radius, or using Samba. Check the mailing list (subscribe, archives).

Note: you do not need to restart pptpd, a change to chap-secrets is effective for the next connection.


Testing

Attempt a connection from a client. On successful connection, a new interface should be created (e.g. ppp0), and the remote IP address of the interface should be pingable. If so, the rest of your problems are likely to be routing.

Note: if you need to set up a Debian test client, see the PPTP Client Debian HOWTO. The test client cannot be on the same host, it doesn't work.

To diagnose faults, enable the options debug dump in /etc/ppp/pptpd-options. The change is effective on the next connection. The debug output goes to /var/log/debug, and the dump output and usual output to /var/log/messages.


Patching

If you need to adopt a source code change made in CVS after the version you are running, see our Applying patches to Debian pptpd page.


Performance Notes

On a Debian system there may be scripts run by pppd when a network interface is brought up. These scripts are in the /etc/ppp/ip-up.d directory.

Some of these scripts may run with incorrect assumptions ... in particular the Debian Sarge exim4 package includes a script /etc/ppp/ip-up.d/exim4 that restarts exim4 or runs the queue. The assumption in this script is that the system has just connected to the internet through the PPP link.

You may wish to customise this script. If your server has a default route via an ethernet interface, then either remove the script or add an exit command near the top.


Comments

If you have comments on this document, please send them to the author at james.cameron at hp.com. But if you need help, use the mailing list (subscribe, archives) so that we can share the load.

ChangeLog

DateChange
2007-11-12 Add links to mailing lists.
2006-04-06 Add warning about /etc/ppp/ip-up.d/exim4.
2005-11-16 Skip MPPE kernel module if reader is using kernel 2.6.15-rc1 or later.
2005-08-08 Add patching reference.
2004-12-23 First draft, tested using Sarge.

Popular posts from this blog

Freenas Snapshots Replication Backup

Mungkin anda sudah mengetahui Freenas sebelumnya. Ya..Freenas adalah salah satu software NAS Storage berbasis FreeBSD. Karena kehandalannya, Freenas banyak digunakan sebagai NAS Storage di dunia IT. Saya pernah berfikir bagaimana jika Freenas yang kita gunakan mengalami masalah, crash misalnya. Mungkin jika hardisknya menggunakan RAID bisa tinggal ganti disknya. Bagaimana jika tidak ada RAID (hari gini Server gak ada Raid hdewww heee) atau hal lain yang membuat data tidak bisa digunakan di Freenas. Tutorial ini saya buat untuk berbagi ilmu kepada rekan2 sekalian. Saya akan coba membuat Replikasi Freenas. Dimana Dataset pada salah satu Freenas (Freenas A) akan di snapshot dan di replikasikan ke Freenas B Hal yang perlu disiapkan : 1.  Freenas A : 192.168.100.1 (Primary) Disk 8GB x 2 2.  Freenas B : 192.168.100.2 (Secondary) Disk 8GB x 2 SETING FREENAS A DAN B Kita akan buat raid mirror untuk 2 disk. Storage - Volume Manager   Volume Name :

Migrasi Nextcloud 19 ke Nextcloud 20.02 (Beda Server)

Server A : 192.168.0.1 (Server lama : Centos 7), port 80 Server B : 192.168.0.2 (Server baru : Centos 8), port 80 Nginx Load Balance : 192.168.0.10, port 443 untuk SSL Tahapan : 1. Upgrade Nextcloud 19.0.3 ke 19.0.5 (server lama) 2. Instalasi server baru (Centos 8) 3. Backup dan restore data nextcloud dan databas ke server baru 4. Konfigurasi Nextcloud di server baru dan Nginx Server 5. Finish A. Upgrade Nextcloud 19.0.3 ke 19.0.5 Untuk Upgrade 19.0.3 ke 20.0.2 tidak dapat dijalankan secara langsung. Harus bertahap upgrade ke versi minor. 19.0.3 -> 19.0.5 secara otomais. Dan upgrade ke 20.0.2 secara manual. 1. Login ke Nextcloud 2. Setting - Administration-Overview 3. Versi yang tersedia 19.0.5 5. Pilih Open updater  4. Start Update 5.  Pilih No (for usage of the web based updater), untuk mode maintenance dan upgrade via console. 6. Masuk ke console dan ke directory /var/www/html/nextcloud 7. Jalankan $ sudo   - u  apache   php occ upgrade 8. Maintenance mode masih dalam keadaan

Zimbra Error Subject : ***UNCHECKED***

Beberapa hari yang lalu Subject email Zimbra selalu di tambahkan tulisan ***UNCHECKED***. Padahal tidak ada perubahan konfigurasi mail server sebelumnya. Cari di google ada beberapa referensi yaitu merubah file /opt/zimbra/. Tahapan : #su root #cd /opt/zimbra/amavisd/bin #cp -pa amavisd amavid.org #vi amavisd Rubah isi file di baris : #su zimbra $undecipherable_subject_tag = '***UNCHECKED*** '; menjadi $undecipherable_subject_tag = '';   $zmamavisdctl restart Di hari berikutnya saya coba cek kembali utilisasi mail dengan 'top'. Terilhat penggunaan clamd sebesar 100%. Coba dicek di log /var/log/zimbra.log |grep clamd hasilnya mail amavis[26778]: (26778-07) ClamAV-clamd: All attempts (1) failed connecting to /opt/zimbra/data/clamav/clamav.sock, retrying (1) Oct 24 10:10:43 mail amavis[26778]: (26778-07) (!)connect to /opt/zimbra/data/clamav/clamav.sock failed, attempt #1: Can't connect to UNIX socket /opt/zimbra/data/clamav/clamav.sock: Co