Graphic tutorial on deploying a VPN Server In Debian

Source: Internet
Author: User
Debian is another excellent Linux operating system. Setting up a VPN Server In Debian is very similar to setting up a VPN Server in CentOS. The process is the same but the commands are different. You 'd better take a look at the tutorial on setting up a VPN in CentOS. The procedure is as follows: 1. After PPP and TUN are enabled, upgrade the system and restart the system once: apt-getupdatere

Debian is another excellent Linux operating system. The setup of a VPN Server In Debian is similar to that in CentOS, but the process is the sameCommandDifferent. You 'd better take a look at the CentOS VPN setup tutorial.

 

The procedure is as follows:

1. After PPP and TUN are enabled, upgrade the system and restart it once:

Apt-get update
Reboot

Ii. Install pptpd:

Apt-get install pptpd

Configure pptpd, edit the/etc/pptpd. conf file, and remove the first two lines #

Localip 192.168.0.1
Remoteip 192.168.0.234-238,192.168 .10.245

3. Configure DNS, edit the/etc/ppp/options file, and add the following two lines:

Ms-dns 8.8.8.8
Ms-dns 8.8.4.4

4. Enable IP Forwarding, edit the/etc/sysctl. conf file, and remove #

Net. ipv4.ip _ forward = 1

5. Add the VPN user name and password, edit the/etc/ppp/chap-secrets file, and enter the file in the following format:

Username pptpd password *

6. Write the forwarding rule as a file, run the command vi/etc/pptpdfirewall. sh, and enter the following content:

Sudo/sbin/iptables-t nat-a postrouting-s 192.168.0.0/24-j SNAT -- to-source your VPS public IP
Sudo/sbin/iptables-a forward-s 192.168.0.0/24-p tcp-m tcp -- tcp-flags FIN, SYN, RST, ack syn-j TCPMSS -- set-mss 1356

7. Set the File Execution permission and execute the following command:

Chmod 755/etc/pptpdfirewall. sh

8. Set boot start, run the command vi/etc/init. d/rc. local, and add the following code to the last line:

Sh/etc/pptpdfirewall. sh

9. After restarting the VPS, you can use your VPN normally:

Reboot

So far, the Debian VPN service has been completed. If the connection error 619 occurs, enter the following command to solve the problem:

Rm/dev/ppp
Mknod/dev/ppp c 108 0

If error 734 appears, modify the/etc/ppp/options.ppt pd file, add # In Front Of The require-mppe-128 field, and then connect to windows client by setting.

Reprinted please indicate the source
Link: http://www.tofree.net/posts/237.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.