当前位置:网站首页>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 )
边栏推荐
- 【MySQL 使用秘籍】克隆数据表、保存查询数据至数据表以及创建临时表
- Analog display of the module taking software verifies the correctness of the module taking data, and reversely converts the bin file of the lattice array to display
- 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 first common node of two linked lists_ The entry of the link in the linked list (Sword finger offer)
- 学会使用楼宇控制系统BACnet网关没那么难
- How to select a third-party software testing company? 2022 ranking of domestic software testing institutions
- What are the dazzling skills of spot gold?
- RDD basic knowledge points
- [GUET-CTF2019]zips
- [Proteus] Arduino uno + ds1307+lcd1602 time display
猜你喜欢
![[tips] use the deep learning toolbox of MATLAB deepnetworkdesigner to quickly design](/img/74/f615191715a9ac58a8546f8d1e8f8d.png)
[tips] use the deep learning toolbox of MATLAB deepnetworkdesigner to quickly design

How to turn on win11 notebook power saving mode? How to open win11 computer power saving mode
![[WordPress website] 5 Set code highlight](/img/01/f669b70f236c334b98527a9320400c.png)
[WordPress website] 5 Set code highlight

【信号识别】基于深度学习CNN实现信号调制分类附matlab代码

Mysql---三张表(student,课程,分数) 查询课程为数学的学生姓名,编号,成绩

Intranet learning notes (4)

超宽带脉冲定位方案,UWB精准定位技术,无线室内定位应用

【图像分割】基于形态学实现视网膜血管分割附matlab代码

关于取模数据序号定位的说明 区码定位是指GBK编码

bjdctf_2020_babystack
随机推荐
bjdctf_2020_babystack
[image fusion] image fusion based on directional discrete cosine transform and principal component analysis with matlab code
Serviceworker working mechanism and life cycle: resource caching and collaborative communication processing
When MFC uses the console, the project path cannot have spaces or Chinese, otherwise an error will be reported. Lnk1342 fails to save the backup copy of the binary file to be edited, etc
在产业互联网时代不再有真正意义上的中心,这些中心仅仅只是化有形为无形而已
[image fusion] multi focus and multi spectral image fusion based on pixel saliency and wavelet transform with matlab code
Group policy disables command prompt bypass
Huawei experimental topology set, learning methods are attached at the end of the article!
Huawei cloud image engine service
Unexpected token u in JSON at position 0
[WUSTCTF2020]爬
10 common malware detection and analysis platforms
[cnpm] tutorial
Win11笔记本省电模式怎么开启?Win11电脑节电模式打开方法
软件性能测试分析与调优实践之路-JMeter对RPC服务的性能压测分析与调优-手稿节选
[learn FPGA programming from scratch -42]: Vision - technological evolution of chip design in the "post Moorish era" - 1 - current situation
【Vulhub靶场】】zabbix-SQL注入(CVE-2016-10134)漏洞复现
Intranet learning notes (4)
【帧率倍频】基于FPGA的视频帧率倍频系统verilog开发实现
Fine! Storage knowledge is a must for network engineers!