Giter Site home page Giter Site logo

iteelion / l2tp-ipsec-vpn Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 38 KB

Easy install, configure and manage script for l2tp/ipsec psk vpn server. Скрипт для установки, настройки и управления впн сервером.

License: Apache License 2.0

Shell 100.00%
vpn l2tp xl2tpd ipsec strongswan script installer configurator manager

l2tp-ipsec-vpn's Introduction

L2TP/IPSEC PSK VPN install, configure and control script

Once I asked myself: dude, how to install and configure a VPN server? That night I will never forget. Long and tedious reading of the documentation and tons of Google requests, yeah that's was hard! Then I decided to make an automatic script for installing configuration and management for myself and you.

Requirements

I tested this script on Debian 10/11, but it's may be adapted for many linux distros.

Default packages: (Debian 10/11)

Package name Why needed
apt To install packages
mc To edit config files
wget To download preconfigured config files
iptables Allow/Disallow trafic

Another packages and distros

You may specify using packages like that:

#!/bin/bash
E="nano"
PM="yum"

For example: change mcedit to nano or vim or change apt to yum for use on CentOS

How to use

Just download vpn.sh file:

wget https://raw.githubusercontent.com/iTeeLion/l2tp-ipsec-vpn/master/vpn.sh

or

curl https://raw.githubusercontent.com/iTeeLion/l2tp-ipsec-vpn/master/vpn.sh --output vpn.sh

and set permissons

chmod 755 ./vpn.sh

How to install/remove vpn server

To install:

./vpn.sh server install

To remove:

./vpn.sh server remove

How to config

To download preconfigured config files:

./vpn.sh install-config all

or get list of available configs and install only needed

./vpn.sh install-config
./vpn.sh install-config %configname%

How to control

Start:

./vpn.sh control start

Restart:

./vpn.sh control restart

Stop:

./vpn.sh control stop
На русском

Скрипт установки и управления L2TP/IPSEC PSK VPN сервером

Однажды я задолбался конфигурировать VPN серверы вручную и решил сделать скрипт для автоматического разворачивания всего необходимого в минимальном виде

Требования

Я проверял скрипт только под Debian 10/11, но думаю это без труда заработает и в других дистрибутивах.

Another packages and distros

В скрипте можно настроить используемые пакеты

#!/bin/bash
E="nano"
PM="yum"

Напрмер: вместо mcedit можно использовать nano и т.д.

Как использовать?

Просто скачать файл скрипта

wget https://raw.githubusercontent.com/iTeeLion/l2tp-ipsec-vpn/master/vpn.sh

или через curl

curl https://raw.githubusercontent.com/iTeeLion/l2tp-ipsec-vpn/master/vpn.sh --output vpn.sh

и даем права на исполнение

chmod 755 ./vpn.sh

Как установить и сконфигурировать VPN L2TP IPSEC PSK сервер

Установить:

./vpn.sh server install

Удалить:

./vpn.sh server remove

Конфигурирование VPN ервера

Скачать настроенные мной конфиги

./vpn.sh install-config all

Можно получить список доступных конфигов и поставить только нужные

./vpn.sh install-config
./vpn.sh install-config %configname%

Управление

Start:

./vpn.sh control start

Restart:

./vpn.sh control restart

Stop:

./vpn.sh control stop

l2tp-ipsec-vpn's People

Contributors

iteelion avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

l2tp-ipsec-vpn's Issues

how to connect

please, could you explain how can i connect to my server after install script ?

mean, i have l2tp client. but the port, username,password ( or tls config ). i don't know how should i find things need to connect.
had you defined on special config file ?

update before everything

Thanks for your script!

I think you should add the repo update (because I started off a blank server), line 183 to be changed from:
eval "$PM install -y $ipsec $l2tp"
to:
eval "$PM update -y && $PM upgrade -y && $PM install -y $ipsec $l2tp"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.