当前位置:网站首页>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.shchmod +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 yourL2TP VPN Server with the defaultUsername/Password is below:ServerIP:your_server_IPPSK:your PSKUsername:your usenamePassword:your passwordIf 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.htmlEnjoy 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 )
边栏推荐
- Fine! Storage knowledge is a must for network engineers!
- 【Vulhub靶场】】zabbix-SQL注入(CVE-2016-10134)漏洞复现
- buuctf misc [UTCTF2020]docx
- 【图像融合】基于方向离散余弦变换和主成分分析的图像融合附matlab代码
- Win11分磁盘怎么分?Win11系统怎么分磁盘?
- Win11怎么设置让CPU性能全开?Win11CPU怎么设置高性能模式?
- 现货黄金有哪些眩人的小技术?
- Huawei cloud image engine service
- Bjdctf 2020 Bar _ Babystack
- How to open the soft keyboard in the computer, and how to open the soft keyboard in win10
猜你喜欢

Intranet learning notes (4)
![[wustctf2020] climb](/img/b6/4a0582144c3125e7a0666bbbbfe29d.png)
[wustctf2020] climb

The fund management of London gold is more important than others

蓝牙耳机怎么连接电脑使用,win10电脑如何连接蓝牙耳机

get_ started_ 3dsctf_ two thousand and sixteen

【图像融合】基于方向离散余弦变换和主成分分析的图像融合附matlab代码

只显示两行,超出部分省略号显示

jarvisoj_ level2

超宽带脉冲定位方案,UWB精准定位技术,无线室内定位应用
![[pointnet] matlab simulation of 3D point cloud target classification and recognition based on pointnet](/img/86/5db689cdac2a927a23dff3fb9594b0.png)
[pointnet] matlab simulation of 3D point cloud target classification and recognition based on pointnet
随机推荐
Huawei Cloud Database Advanced Learning
bjdctf_2020_babystack
【图像融合】基于像素显着性结合小波变换实现多焦点和多光谱图像融合附matlab代码
【图像融合】基于NSST结合PCNN实现图像融合附matlab代码
A case of bouncing around the system firewall
Dichotomous special training
[tips] use the deep learning toolbox of MATLAB deepnetworkdesigner to quickly design
How to open the soft keyboard in the computer, and how to open the soft keyboard in win10
2、 What is the principle of layer 3 and 4 switching technology? Recommended collection!
二分专题训练
相机标定(标定目的、原理)
(CVE-2020-11978)Airflow dag中的命令注入漏洞复现【vulhub靶场】
Leetcode probability interview shock series 11~15
bjdctf_2020_babystack
[OGeek2019]babyrop
利用微搭低代码实现级联选择
[image feature extraction] image feature extraction based on pulse coupled neural network (PCNN) including Matlab source code
[image fusion] multi focus and multi spectral image fusion based on pixel saliency and wavelet transform with matlab code
jarvisoj_ level2
buuctf misc 从娃娃抓起