Set up the L2TP service in RHEL5-Linux Enterprise Application-Linux server application information. The following is a detailed description. I don't know why. a vpn device in the company has a problem. On that day, VPN users dropped frequently and the network speed was very slow. I tried using ping and the delay was very long, basically, it takes about 800 to 1000 milliseconds, and packet loss is very serious, accounting for about 40% of the total, and the business of the branches is basically not normal. I thought it was a problem with the cable. I can find the ISP maintenance personnel who inserted the network cable into the notebook. Everything went fine. The return time was about 40 milliseconds and the ping time was 1 hour, I didn't lose a pack, so I gave a sentence: "Our line is good. It's a problem with your device." Then I patted my ass and went away.
Our VPN device is a big box with a slap in the face. I don't want to talk about the brand or model. It is based on l2tp. Now there is a problem. If you want to find someone from the manufacturer, you may not be able to solve the problem. You can't do it. After you find the information on the Internet, you plan to use Linux as your own L2TP VPN Server.
First install RHEL5 and then:
Make
Make install
After the installation is complete, modify the relevant configuration file:
1. Modify/etc/xl2tpd/xl2tpd. conf as follows:
[Lns default]
Ip range = 192.168.191.2-192.168.191.254
Local ip = 192.168.191.1
Require chap = yes
Refuse pap = yes
Require authentication = yes
Name = l2tpvpnserver
Ppp debug = yes
Pppoptfile =/etc/ppp/options. xl2tpd
Length bit = yes
2. Modify/etc/ppp/options. xl2tpd with the following content:
Start (){
Echo-n "Starting $ SERVICE :"
If [! -D/var/run/xl2tpd]
Then
Mkdir/var/run/xl2tpd
Fi
Daemon $ SERVICE
RETVAL =$?
[$ RETVAL-eq 0] & touch/var/lock/subsys/$ SERVICE
Echo ""
Return $ RETVAL
}
Stop (){
Echo-n "Stopping $ SERVICE :"
Killproc $ SERVICE
RETVAL =$?
Echo
[$ RETVAL-eq 0] & rm-f/var/lock/subsys/$ SERVICE
Return $ RETVAL
}
Restart (){
Stop
Start
}
# See how we were called.
Case "$1" in
Start)
Start
;;
Stop)
Stop
;;
Status)
Status $ SERVICE
RETVAL =$?
;;
Restart | reload)
Restart
;;
Condrestart)
[-F/var/lock/subsys/$ SERVICE] & restart |:
;;
*)
Echo "Usage: $ SERVICE {start | stop | status | restart | reload | condrestart }"
Exit 1
Esac
Run the chmod command to grant executable permissions to the xl2tpd file.
Add xl2tpd to the System Service:
Chkconfig -- add xl2tpd
Use the setup command to set the xl2tpd service to automatically start upon startup.
Now, the VPN Server Configuration for L2TP is complete. Create a VPN connection in Windows XP. Enter the IP address of the server, username myvpntest, password myvpntest, connection, and HA.
The manufacturer came, and the technicians joined the box for a while. Then they said the device was okay, but they saw that the bandwidth had been occupied. We suggest you contact your ISP. So I immediately contacted the ISP and requested a temporary increase in bandwidth. Fortunately, the ISP agreed to be more refreshing. After the bandwidth increases, it seems that the fault has been rectified. It seems that today we are busy, and the newly installed server has to be put aside. Wait for a chance and try again.
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.