当前位置:网站首页>L2tp/ipsec one click installation script
L2tp/ipsec one click installation script
2022-06-24 07:31:00 【Chen Bucheng I】
One . brief introduction
This script is applicable to : System support :CentOS6+,Debian7+,Ubuntu12+ Memory requirements :≥128M Updated date :2017 year 05 month 28 Japan
About this script : The term is explained as follows L2TP(Layer 2 Tunneling Protocol) IPSec(Internet Protocol Security) IKEv2 (Internet Key Exchange v2) It can be realized IPsec On the whole, there are openswan,libreswan,strongswan this 3 Kind of . libreswan Is based on openswan Of fork, So we can't see it in each distribution openswan The figure of the . Of course, it can also be used strongswan Of .
The reason to update L2TP One click Install script , Because with each Linux The distribution continues to push through the old and bring forth the new , The original script can no longer meet the current needs . This script installs the latest version by compiling libreswan To achieve IPSec(CentOS7 Next is all yum install ),yum or apt-get To install xl2tpd, According to the usage of each distribution , Deploy firewall rules .
Write it at the front : be based on OpenVZ Virtualization technology VPS Need to open TUN/TAP For normal use , Buy VPS Please check with the service provider to see if it supports opening TUN/TAP.
OpenVZ Virtual VPS Need system kernel support IPSec Talent . in other words , If the kernel of the parent server does not support it, there is no way , Only for VPS. therefore , It is generally not recommended that OpenVZ Of VPS Install this script on . If the script detects this VPS by OpenVZ framework , A warning will appear .
How to detect whether it supports TUN modular ? Carry out orders : cat /dev/net/tun If the return information is :cat: /dev/net/tun: File descriptor in bad state Explain normal
How to detect whether it supports ppp modular ? Carry out orders : cat /dev/ppp If the return information is :cat: /dev/ppp: No such device or address Explain normal Of course , The script also performs checks during installation , If not applicable for installation , The script will prompt .
Two . Install and use
root After the user logs in , Run the following command : wget --no-check-certificate https://raw.githubusercontent.com/teddysun/across/master/l2tp.sh
chmod +x l2tp.sh
./l2tp.sh
After execution , There will be the following interactive interface
Please input IP-Range: (Default Range: 192.168.18): Input local IP Paragraph scope ( Local computer connected to VPS To a local assigned IP Address ), Direct return means entering a default value 192.168.18
Please input PSK: (Default PSK: teddysun.com): PSK Pre shared key , That is, to specify a key to be used in connection in the future , Direct return means entering a default value teddysun.com
Please input Username: (Default Username: teddysun): Username Means user name , The first default user . Direct return means entering a default value teddysun
Please input teddysun’s password: (Default Password: Q4SKhu2EXQ): Enter the user's password , One will be randomly generated by default 10 Bit password with upper and lower case letters and numbers , Of course, you can also specify the password .
ServerIP:your_server_main_IP Show your VPS The Lord of IP( If it is more IP Of VPS Only one )
Server Local IP:192.168.18.1 Show your VPS The local IP( The default can be )
Client Remote IP Range:192.168.18.2-192.168.18.254 Show IP Paragraph scope
PSK:teddysun.com Show PSK
Press any key to start…or Press Ctrl+c to cancel Press any key to continue , If you want to cancel the installation , Please press Ctrl+c key
After installation , The script will execute ipsec verify Command and prompt as follows :
If there are no [FAILED] above, then you can connect to your
L2TP VPN Server with the default
Username/Password is below:
ServerIP:your_server_IP
PSK:your PSK
Username:your usename
Password:your password
If you want to modify user settings, please use command(s):
l2tp -a (Add a user)
l2tp -d (Delete a user)
l2tp -l (List all users)
l2tp -m (Modify a user password)
Welcome to visit https://teddysun.com/448.html
Enjoy it!
If you want to operate on users , You can use the following command : l2tp -a New users l2tp -d Delete user l2tp -m Modify the password of an existing user l2tp -l List all user names and passwords l2tp -h List help information
Other matters : 1、 After the script is installed , Process started automatically , And add the startup and self startup . 2、 The script will rewrite iptables or firewalld The rules of . 3、 During script installation , The installation log will be written to /root/l2tp.log In the document , If your installation fails , You can use this file to find error messages .
Use command : ipsec status ( see IPSec Running state ) ipsec verify ( see IPSec Examination result ) /etc/init.d/ipsec start|stop|restart|status (CentOS6 Next use ) /etc/init.d/xl2tpd start|stop|restart (CentOS6 Next use ) systemctl start|stop|restart|status ipsec (CentOS7 Next use ) systemctl start|stop|restart xl2tpd (CentOS7 Next use ) service ipsec start|stop|restart|status (Debian/Ubuntu Next use ) service xl2tpd start|stop|restart (Debian/Ubuntu Next use )
边栏推荐
- [wustctf2020] climb
- The latest crawler tutorial in 2021: video demonstration of web crawling
- A summary of the posture of bouncing and forwarding around the firewall
- [MRCTF2020]千层套路
- More than 60 million shovel excrement officials, can they hold a spring of domestic staple food?
- 取模软件 模拟显示验证取模数据正确性 逆向 把点阵数组bin文件转显示
- What is an intrusion detection system?
- buuctf misc 从娃娃抓起
- 【MySQL 使用秘籍】克隆数据表、保存查询数据至数据表以及创建临时表
- [image fusion] image fusion based on pseudo Wigner distribution (PWD) with matlab code
猜你喜欢
相机标定(标定目的、原理)
The first common node of two linked lists_ The entry of the link in the linked list (Sword finger offer)
How to open the soft keyboard in the computer, and how to open the soft keyboard in win10
Win11笔记本省电模式怎么开启?Win11电脑节电模式打开方法
The fund management of London gold is more important than others
【Proteus】Arduino UNO + DS1307+LCD1602时间显示
Ultra wideband pulse positioning scheme, UWB precise positioning technology, wireless indoor positioning application
伦敦金的资金管理比其他都重要
Prefix and topic training
只显示两行,超出部分省略号显示
随机推荐
20个不容错过的ES6技巧
What is a CC attack? How to judge whether a website is attacked by CC? How to defend against CC attacks?
What is the mentality of spot gold worth learning from
The initial user names and passwords of Huawei devices are a large collection that engineers involved in Huawei business should keep in mind and collect!
The latest crawler tutorial in 2021: video demonstration of web crawling
[learn FPGA programming from scratch -42]: Vision - technological evolution of chip design in the "post Moorish era" - 1 - current situation
RDD basic knowledge points
利用微搭低代码实现级联选择
蓝牙耳机怎么连接电脑使用,win10电脑如何连接蓝牙耳机
【WordPress建站】5. 设置代码高亮
[机缘参悟-29]:鬼谷子-内揵篇-与上司交往的五种层次
与(&&)逻辑或(||),动态绑定结合三目运算
【图像融合】基于伪 Wigner 分布 (PWD) 实现图像融合附matlab代码
Buuctf misc grab from the doll
【图像融合】基于方向离散余弦变换和主成分分析的图像融合附matlab代码
[Proteus] Arduino uno + ds1307+lcd1602 time display
如何删除/选择电脑上的输入法
[WUSTCTF2020]alison_ likes_ jojo
[image fusion] image fusion based on pseudo Wigner distribution (PWD) with matlab code
6000多万铲屎官,捧得出一个国产主粮的春天吗?