1. ubuntu use apt install pptpd is very convenient, automatically started after installation; $ sudoapt-getinstallpptpd2. modify/etc/pptpd. conf, assign an internal IP address; localip192.168.0.1remoteip192.168.0.234-238,192.168 .0.2453. modify/etc/ppp/chap-secrets to create VPN users and ports
1. It is very convenient to install pptpd using apt in Ubuntu. It is automatically started after installation;
$ Sudo apt-get install pptpd
2. Modify/etc/pptpd. conf and assign an internal IP address;
Localip 192.168.0.1
Remoteip 192.168.0.234-238,192.168 .0.245
3. Modify/etc/ppp/chap-secrets and create a VPN user and password;
Username pptpd password *
NOTE: If * is changed to a fixed internal IP address, the user will be assigned to the fixed address to ensure that the user can create only one VPN connection.
4. Modify/etc/ppp/options and support automatic DNS allocation to prevent DNS hijacking;
Ms-dns 8.8.8.8
Ms-dns 8.8.4.4
Note: Google Open DNS is used above, and other services can be used.
5. Modify/etc/sysctl. conf and support IP forwarding;
Net. ipv4.ip _ forward = 1
Note: Use the following command to take effect:
$ Sudo sysctl-p
6. Modify iptables to support forwarding;
$ Sudo/sbin/iptables-t nat-a postrouting-s 192.168.0.0/24-o eth0-j MASQUERADE
Note: No VPS, not tested.
7. Restart the VPN service;
$ Sudo/etc/init. d/pptpd restart
Experiment results: You can use the user name/password on XP to connect to the VPN Server, and you can connect to the VPN Server; no VPS, so no further test is performed. Next we will try to monitor the traffic of VPN customers.