Giter VIP home page Giter VIP logo

nipovpnbash's Introduction

What is this?

This is an easy installation script to help you config these VPN protocols on your VPS.

With ArvanCloud CDN In this method you need to have a domain and an account in ArvanCloud

  • v2ray+vmess+ws+nginx+tls

Without ArvanCloud CDN

  • shadowsocks+obfs
  • v2ray+vmess
  • v2ray+vmess+ws
  • trojan

Requirements

  1. an external VPS (outside Iran)
  2. an internal VPS (Inside Iran) This is optional and you can use it for only external
  3. Debian 11 OR Ubuntu 20.04 as the OS of both VMs
  4. Able to SSH without password to both internal and external server
  5. In case of ArvanCloud CDN, you need to have a domain and an account in ArvanCloud
  6. Do not forget to install jq where you are executing this script like
 [~]>$ sudo apt install jq

How to setup ssh key on client

Your client (where the script will be executed), must be able to ssh without password and with ssh-key. To do this, you need to create ssh key if you do not have in your client. With following command you can create ssh-key in your client

[~]>$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/morteza/.ssh/id_rsa):
.........

Then you need to copy the generated ssh key to the destination hosts with the following command

[~]>$ ssh-copy-id [email protected]

A video guide usage can be found in youtube.

A video guide usage For Arvan CDN can be found in youtube.

How to Run

  1. Download or clone the project
  2. Go the the directory
[~/data/git/MortezaBashsiz/nipovpn/scripts]>$ ls -l
total 36
-rw-r--r-- 1 morteza morteza 1763 Nov  1 10:56 arvan.sh
-rw-r--r-- 1 morteza morteza 1763 Nov  1 10:56 basic.sh
-rw-r--r-- 1 morteza morteza 1186 Oct 31 13:30 check.sh
-rw-r--r-- 1 morteza morteza 5037 Oct 31 14:52 external.sh
-rw-r--r-- 1 morteza morteza 2599 Oct 31 14:48 interaction.sh
-rw-r--r-- 1 morteza morteza 2867 Oct 31 14:41 internal.sh
-rw-r--r-- 1 morteza morteza  982 Nov  1 10:59 nipovpn.sh
-rw-r--r-- 1 morteza morteza 1334 Oct 31 11:54 pkg.sh
-rw-r--r-- 1 morteza morteza  447 Nov  1 11:14 README.md
[~/data/git/MortezaBashsiz/nipovpn/scripts]>$
  1. Execute the nipovpn.sh and answer the questions like following
[~/data/git/MortezaBashsiz/nipovpn/scripts]>$ bash nipovpn.sh 

> Welcome to nipovpn 
> Please answer to the following questions 
> Would you like to use ArvanCloud as CDN ? 
1) yes
2) no
#? 2
> This script by default uses for setting up internal and external servers 
> How do you want to use this script? 
> Please choose from following or leave empty and push enter button for continue 
>> 1) both
>> 2) external
1
> Please answer to the following questions 
> Internal server IP address IP.IP.IP.IP
65.21.189.183
> SSH port for internal server 65.21.189.183 (default 22)
22
> Internal server port (default 443)
445
> External server IP address IP.IP.IP.IP
65.108.221.16
> SSH port for external server 65.108.221.16 (default 22)
22
> External server port (default 443)
445
> What kind of service would you like to use?
> These are the type of services which is supported by this script (ENTER THE NUMBER)
1) shadowsocks+obfs
2) v2ray+vmess
3) v2ray+vmess+ws
4) trojan
#? 4
> Installing packages htop net-tools iptables-persistent vim fail2ban
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]

nipovpnbash's People

Contributors

mortezabashsiz avatar

Stargazers

Mohammad 'Reza Roointan' avatar ITLover avatar  avatar Ardeshir avatar  avatar  avatar SurfboardV2ray avatar Farshid Majidi avatar hmn falahi avatar Fayyazzadeh avatar D.A avatar Afrouz Mashayekhi avatar Alireza_Fedora avatar Foat avatar  avatar  avatar  avatar Amirhosein Heydari avatar Sina Lalebakhsh avatar Alireza Hedayatfar avatar  avatar  avatar  avatar  avatar Mohammad avatar Artin Zamani avatar Morteza Bahmani avatar  avatar  avatar Opiran club avatar Ilya avatar Arash Nemat Zadeh avatar Kamran Moallem avatar Mohammad Mansoury avatar sobhan shokri avatar Rezpit avatar Hossein Rezaie avatar Mo Hadi avatar Hossein avatar  avatar  avatar Rez avatar Mehdi Parhizi avatar Mohammad Jafarinejad avatar Mohammad Moosazadeh avatar MohammadJavad Madadi avatar Ali avatar Arshia Pazoki avatar Milad Safajuy avatar bagher sohrabi avatar Reza avatar Hojat Gazestani avatar Mehdi Zakhire avatar Majid Nik avatar Ali Keshavarz avatar Arash Farahmandi avatar Hatef Sanati avatar Moel avatar Majid Khorshidian avatar  avatar Mohammad Hosein Jalali avatar Alien_nix avatar Ali Ebrahimi avatar mahdi-313-ir avatar MohammadHasan Pourghannad avatar  avatar Mohammad Mahdi Nazari avatar  avatar Hossein Amirkhalili avatar ViCi avatar Mahdi Mohammadi avatar Majid Darvishan avatar Azad Poursadegh avatar Bach avatar Milad Hakimi avatar  avatar  avatar  avatar Jam avatar Atiye Mazhari avatar ali avatar Bahman World avatar A. Younesi avatar Hossein Hazrati avatar Mansoor Nabawi avatar Iman Jafari avatar milad avatar Mojtaba Farzaneh avatar Mohammad Saadat avatar Soheil Sisakht avatar  avatar  avatar Amir Ghaffari avatar MohammadTaghi Naghibi avatar  avatar Omid Panahi avatar  avatar Demi Minix avatar  avatar RaminMT avatar

Watchers

NoRRt avatar  avatar  avatar Eyni, Kave avatar  avatar

nipovpnbash's Issues

Domain name entry unsuccessful

Hi

I'm using the nipovpn.sh script with the Arvan Cloud Option and when I enter my domain I face this error:

arvan.sh: line 27: jq: command not found
(23) Failed writing body
arvan.sh: line 27: jq: command not found
(23) Failed writing body
ERR: Domain creation faild

I should let you know that there has been some changes to the api key section of the Arvan panel. Their customer support Instructed me to use User Machine key instead.

Best regards

Certbot failed to authenticate domain

There is some problem in creating letsencrypt with bellow

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
Requesting a certificate for vpn.kazem.skin

Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
Domain: vpn.kazem.skin
Type: connection
Detail: 5.161.70.233: Fetching http://vpn.kazem.skin/.well-known/acme-challenge/yyz5CskiIwEt9CTPdMsqxzHQ8HbWoIVu2T4LgS_4vFs: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority failed to download the challenge files from the temporary standalone webserver started by Certbot on port 80. Ensure that the listed domains point to this machine and that it can accept inbound connections from the internet.
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.

Setting up V2RAY using only an external VPS

Since nowadays there isn't permanent nationalization in Iran's network,
it would be better to add an feature for using this script in only an external VPS.

Best Regards,

Failed to detect internet connection

I setup your nipovpn on my ubuntu 20.04 LTS server and it's located on Hetzner
After setup I gave my Vmess url and set it on v2rayng android application it's successfully connect but when I tap connection and test it on v2rayng I see the following error:

Failed to detect internet connection: io: read/write on closed pipe

bug and ssh access is taken

سلام
در حین اجرای کد پس از نصب دیپندنسی ها از من پسورد میخواست ، به صورت زیر:
[email protected]'s password:
در صورتی که اصلا روی سرور 191.331.56.67 کاربری به اسم darvin ندارم و این کاربر متعلق به سیستم لوکال من هست
هر پسوردی زدم قبول نکر و نهایت با کنسل کردن اون تمامی دسترسی ssh من گرفته شد :( احتمالا به علت تغییراتی که اسکریپت توی ip tables انجام داده

SSH connectivity is not OK

Hi, when I try to use the script for creating a VPN connection, at the start internal server IP, I get an error :
ERR: SSH connectivity is not OK with user root to IP 1.2.3.4 and port 22

but when I use instant from Terminal with this command "ssh [email protected]" without any problem connecting to the internal server

Fail to detect internet connection: io: read/write on closed pipe

Hi
i used your script to run vpn
everything seems OK but i have a problem with gheychivpn.domain.x:443 when try to connect but i'm ok with vpn.domain.x:443

both cname and subdomain is set in arvan cloud and my external server is ok but with v2rayng client i get this error:
Fail to detect internet connection: io: read/write on closed pipe

whatsapp call

Just curious to know whether "Whatsapp Call" work with provided scripts?
TIA

Api key

I got API-key in this format "apikey f1ce1176-7e83-550d-9db1-************" Is that correct?
I got this key for "Machine User" am I right?

ERR: SSH connectivity

#######################################
Domain is active in Arvan Now goint to add records
Enter your Server IP like IP.IP.IP.IP
IP.IP.IP.IP
Record created by name gheychivpn.masoudcdn.ml
SSH port for Arvan server NULL (default 22)

ERR: SSH connectivity is not OK with user root to IP.IP.IP.IP and port 22

what should be done to fix the error?

Unable to install v2ray

Morteza jan the script isnt able to install v2ray from repository and therefore gives a lot of error and in the end doesnt provide a vmess url.
see screenshot for more detailed error.

72C884FF-ED4F-430C-8E46-E0F206AED19F

Appreciate your detailed help.

ERR: Domain creation faild

After entering the domain I get the following error:

arvan.sh: line 27: jq: command not found
(23) Failed writing body
arvan.sh: line 27: jq: command not found
(23) Failed writing body
ERR: Domain creation faild

**OS: Ubuntu 20.04

Cloudflare Script

Hi, I want to use the Arvan script with Cloudflare CDN. In fact, I want to set up v2ray+vmess+ws+nginx+tls configuration in Cloudflare.
Is it possible to set up the Arvan script and just move a domain from Arvan to Cloudflare (change in domain registrar and create A record and CNAME record in Cloudflare like Arvan)? Actually, I tried it but it has TLS handshake problems.
How can I change Arvan's script to work in Cloudflare?

DNS leak

Hi,
I have DNS Leak with the shadowsocks + obfs.
What we can do to fix it?

Improve read me

Thanks for the repository. I suggest adding this description at the beginning of the readme.md

`

What is this?

This is an easy installation script to help you config these VPN protocols on your VPS.

  • shadowsocks+obfs
  • v2ray+vmess
  • v2ray+vmess+ws
  • trojan

Requirements

  1. an external VPS (outside Iran)
  2. an internal VPS (Inside Iran)
  3. Debian 11 as the OS of both VMs

A video guide on the usage can be found in Youtube.
`

Arvan API has changed

Seems like the arvan api has changed and the script breaks.
Any thoughts?

ApiKey authenticated
Please enter your domain. For example it like (sudoer.info)
sudoer.info
arvan.sh: line 27: jq: command not found
(23) Failed writing body
arvan.sh: line 27: jq: command not found
(23) Failed writing body
ERR: Domain creation faild

ERROR: Domain creation failed

It failed on domain step.

Error: Domain creation failed.
Domain: *.ir

I use it without any VPN but still face this error.

"ERR: Domain creation failed"

I tried using bash nipovpn.sh and it failed with the error: ERR: Domain creation failed

Steps to reproduce:

  1. Created a domain on namecheap.
  2. Created an ubuntu machine on digitalocean.
  3. Generated an Api Key (User machine) in Arvancloud as explained in your video
  4. Ran the script from my Linux machine.
  5. ApiKey authenticated successfully.
  6. Domain creation failed.

Note: Arvan is generating the API key differently than you demonstrated in your video. I don't think that matters though as it's passing the authentication step successfully.

ArvanCloud
1

Namecheap
4

Script Result
3

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.