From b0f808a6d81d8fcf11a33e6988dbe4db8aa6b97d Mon Sep 17 00:00:00 2001 From: ITz <34165182+ITz-net@users.noreply.github.com> Date: Mon, 23 Dec 2019 18:15:15 +0300 Subject: [PATCH] Updated How to use glorytun with 2 isp (draft) (markdown) --- How-to-use-glorytun-with-2-isp-(draft).md | 58 ++++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/How-to-use-glorytun-with-2-isp-(draft).md b/How-to-use-glorytun-with-2-isp-(draft).md index 26fa968..6f15a7d 100644 --- a/How-to-use-glorytun-with-2-isp-(draft).md +++ b/How-to-use-glorytun-with-2-isp-(draft).md @@ -2,7 +2,7 @@ In this article, i will not touch on many issues on client/server optimization, security, i will write only the basic and most necessary (important) instructions for create a tunnel connection with glorytun with two ISP at the same time and checking its performance. -**Prepare** +## **Prepare** Client (Router) and Server (VPS) using Ubuntu LTE 18.04 x64, you may use other linux distro's @@ -13,6 +13,60 @@ Client (Router) and Server (VPS) using Ubuntu LTE 18.04 x64, you may use other l for best results, both of your connections with your Internet service providers should be as similar as possible, on technical characteristics like ping, bandwidth, upload/download (rx/tx) and etc, it is very important! -**Server hardware configuration:** 1 Gigabit NIC, 512 Ram, 1-2 Ghz cpu, 10gb ssd +**Server hardware configuration:** 1 Gigabit NIC with ONE IPv4 address, 512 Ram, 1-2 Ghz cpu, 10gb ssd +* 1 nic eth0 with ip 195.245.103.245 connected to internet for best results, both of your connections with your Internet service providers should have minimal ping to your server, this is very important! + + +**Installation** +I assume that you have already installed the Ubuntu OS on the client and buy & prepare VPS server, configured ssh access to your client and server and we proceed to the direct installation and configuration of Glorytun + +We be use pre-compiled version of glorytun 0.2.2, for client and server, all commands need to run from root user + +## **Server side:** + +download glorytun binare file + +`wget https://github.com/angt/glorytun/releases/download/v0.2.2/glorytun-0.2.2-x86_64-linux-musl.bin` + +rename it + +`mv glorytun-0.2.2-x86_64-linux-musl.bin glorytun` + +make executable + +`chmod +x glorytun` + +**Now configuring glorytun** + +first create encryption key +`./glorytun keygen > gt.key` + +run glorytun with bind server ip 195.245.103.245 and port 55055 and tun0 interface (if need), i use chacha encryption, aes my client is not support, you may don't indicate port and tun interface.. + +`./glorytun bind 195.245.103.245 55055 dev tun0 keyfile gt.key chacha` + +now adding ip v4 address to tun0 interface: + +`ifconfig tun0 10.0.1.1 pointopoint 10.0.1.2 up` + +also we need route traffic from glorytun tunnel (tun0) to internet (eth0): + +masqarade traffic from glorytun tunnel network to internet: + +`iptables -t nat -I POSTROUTING -s 10.0.1.0/24 -o eth0 -j MASQUERADE` + +accept input traffic from tun0 interface: + +`iptables -I INPUT -i tun0 -j ACCEPT` + +enable forward traffic between tun0 (glorytun) and eth0(internet) interfaces: +``` +iptables -I FORWARD -i eth0 -o tun0 -j ACCEPT +iptables -I FORWARD -i tun0 -o eth0 -j ACCEPT +``` + +## **Client side:** + +# ### soon \ No newline at end of file