Nowadays, more and more Linux environments are used. For example, if the Headquarters uses Linux, but the branches are scattered and not easy to manage, windows is still used, in general, we connect the branches to the Headquarters through VPN. Generally, VPN includes PPTPVPN, IPSECVPN, and L2TPVPN. PPTP is the easiest and IPSECVPN is the most common. It is supported by various platforms. L2TPVPN is the safest. After many experiments, I finally succeeded, I will share it with you today.
Nowadays, more and more Linux environments are used. For example, if the Headquarters uses Linux, but the branches are scattered and not easy to manage, windows is still used, in general, we connect the branches to the Headquarters through VPN. Generally, VPN includes pptp vpn, ipsec vpn, and L2TP VPN. PPTP is the easiest, and ipsec vpn is the most common. It is supported by all platforms. L2TP VPN is the safest. After many experiments, I finally succeeded. I will share it with you today.
Let's take a look at the specific configuration process:
(1) download and install
Since Linux does not integrate the PPTP function, we need to install related components to allow our RedHat to support PPTP. According to the kernel version, download the corresponding installation package. Here the kernel is kernel2.6.9-5. EL and 2.6.14 use the following components:
Dkms-2.0.6-1.noarch.rpm
Kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
Ppp-2.4.3-5.rhel4.i386.rpm
Pptpd-1.3.0-0.i386.rpm
1. PPTP requires PPP support, although the system itself has PPP function, but it does not support MPPE, so you need to update the PPP components of the system, download the ppp-2.4.3-5.rhel4.i386.rpm installation command as follows:
# Rpm-Uvh ppp-2.4.3-5.rhel4.i386.rpm
2. Install the kernel MPPE patch. The installation command is as follows:
# Rpm-ivh dkms-2.0.6-1.noarch.rpm
# Rpm-ivh kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
Run the following command to check whether the kernel MPPE patch is successfully installed. If the MPPE module is loaded, run the following command:
# Modprobe ppp-compress-18 & echo success
3. Run the following command to install pptpd:
# Rpm-ivh pptpd-1.3.0-0.i386.rpm
4. Run the following command to check whether the PPP supports MPPE:
# Strings '/usr/sbin/pppd' | grep-I mppe | wc -- lines
46 <如果以上命令输出为“0”则表示不支持;输出为“30”或更大的数字就表示支持,我这里为46> .