Debian system build VPN Server

Source: Internet
Author: User

Debian system build VPN Server 1. install PPTPD www.2cto.com # apt-get install pptpd 2. Edit pptpd. conf file # vim/etc/pptpd. conf makes the uncommented content as follows: option/etc/ppp/pptpd-optionslocalip 192.168.0.1remoteip 192.168.0.234-238,192.168 .0.245 set the IP address range that can be obtained after the external computer connects to the vpn through pptp and the IP address of the server. Www.2cto.com 3. Add a logon user # vim/etc/ppp/chap-secrets to add a line. The content is as follows: lavender pptpd "lavender" * the password is enclosed in double quotation marks. The asterisk at last indicates that the password can be connected from any IP address. If you want to set an IP address, you can also. Theoretically, a vpn has been set up here. However, you cannot use this method to access the Internet, because all the data is applied to the pptpd server, instead of being transferred to the dial-in computer device. To access the Internet, you also need to configure iptables: 4. Set DNS resolution, edit pptpd-options #/etc/ppp/pptpd-options, find ms-dns, and cancel the comment, and modify the DNS address I use google dns, the following ms-dns 8.8.8.8ms-dns 8.8.4.4 5, enable forwarding vim/etc/sysctl. conf cancels the annotation of the following content line (debian4 and 5 will be slightly different). net. ipv4.ip _ forward = 1 6. Run the following command, set the FORWARD function to enable echo 1>/proc/sys/net/ipv4/ip_forward 7, install iptables, and set # apt-get install iptables # iptables-t nat-I POSTROUTING-j MASQUERADE 8. Start the service #/etc/init After the. d/pptpd restart VPN is set up, you can try to log on with the client. PS: pptpd listening port number is 1723

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.