[TUTO] Monter son propre serveur VPN Wireguard sur un serveur sur Onche (2024)

Prêt à découvrir la magie anti-censure pour se libérer de la dictature d'un sh*thole ?!

[TUTO] Monter son propre serveur VPN Wireguard sur un serveur sur Onche (1)

Ce tuto a pour but de vous indiquer comment monter votre propre serveur VPN (sur Ubuntu) en ligne de commande, en louant un serveur ou VPS chez un provider.

[TUTO] Monter son propre serveur VPN Wireguard sur un serveur sur Onche (2)

Niveau necessaire : Avoir des connaissance de base en linux (putty, cd, cat, ls ...)
Cout d'un VPS : ~3-5€ mois (30€ par an)
Disclaimer : Ce tuto ne vous apprend pas à sécuriser votre serveur, ni à être un "hacker invisible" (pas d'obfurcation, rien concernant le navigateur), il s'agit d'une installation basique.
Ameliorations possibles : Ajout d'un redirection de port pour la rivière, ajout d'un container docker qbittorent

On va supposer que vous venez de prendre un serveur ou VPS :

---------------------------------------------
---------------------------------------------
#### 0) Quand vous commandez le serveur, connectez vous avec Putty (à installer sur votre PC) : https://putty.org/
#### Dans Putty, Hostname: "5.199.199.209", Port: "22"
#### Une fois sur le serveur, changez vos password : mettre un truc solide, votre serveur est sur internet, donc vous serez attaqué en permanence
root@myserver:~# passwd
New Password:

#### 1) Mise à jour
#### Mettre à jour et installer des outils :
root@myserver:~# apt update
root@myserver:~# apt upgrade
root@myserver:~# apt install dnsutils tcpdump wireguard wireguard-tools net-tools qrencode linux-headers vim curl

#### Configuration de vim vimrc pour faciliter le C/C (sauf si vous utilisez un autre editeur de texte)
root@myserver:~# echo "set nocompatible" >> .vimrc
root@myserver:~# echo "set mouse-=a" >> .vimrc
root@myserver:~# echo "set backspace=indent,eol,start" >> .vimrc

#### 2) Prise d'info
#### Recuperation des infos necessaire pour wireguard (avant de l'installer) :
#### Notez le nom de votre interface à "ip public" (ne doit pas être une ip en 192.x.x.x, 10.x.x.x, 172.x.x.x ou 127.x.x.x)
#### Par exemple, pour moi, la ligne "inet" indique mon ipv4, c'est "ens1" :
root@myserver:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
altname enp2s1
inet 5.199.199.209/24 metric 100 brd 5.199.199.255 scope global dynamic ens1
valid_lft 862674sec preferred_lft 862674sec

#### 3) Wireguard
#### Installation de wireguard ( via https://github.com/angristan/wireguard-install)
root@myserver:~# curl -O https://raw.githubusercon[...]ster/wireguard-install.sh
root@myserver:~# chmod +x wireguard-install.sh

#### Ici on lance l'install, ça sera interactif, je vous indique par des MAJUSCULES les truc à remplir
#### Normalement, vous avez juste à changer "IPv4 or IPv6 public address:" et "Public interface:"
root@myserver:~# ./wireguard-install.sh
Welcome to the WireGuard installer!
The git repository is available at: https://github.com/angristan/wireguard-install

I need to ask you a few questions before starting the setup.
You can leave the default options and just press enter if you are ok with them.

IPv4 or IPv6 public address: 5.199.199.209 <= ICI METTRE VOTRE IP PUBLIC
Public interface: ens1 <= ICI METTRE VOTRE INTERFACE
WireGuard interface name: wg0 <= LAISSER PAR DEFAUT
Server's WireGuard IPv4: 10.66.66.1 <= LAISSER PAR DEFAUT
Server's WireGuard IPv6: fd42:42:42::1 <= LAISSER PAR DEFAUT
Server's WireGuard port [1-65535]: 51603 <= PRENDRE UN PORT ENTRE 10000-65535
First DNS resolver to use for the clients: 1.1.1.1 <= METTRE LE DNS DE CLOUUDFLARE 1.1.1.1
Second DNS resolver to use for the clients (optional): 1.0.0.1 <= METTRE LE DNS DE CLOUUDFLARE 1.0.0.1

Okay, that was all I needed. We are ready to setup your WireGuard server now.
You will be able to generate a client at the end of the installation.
Press any key to continue...
* Applying /etc/sysctl.d/98-rpi.conf ...
kernel.printk = 3 4 1 3
vm.min_free_kbytes = 16384
net.ipv4.ping_group_range = 0 2147483647
* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.d/protect-links.conf ...
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/wg.conf ...
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
* Applying /etc/sysctl.conf ...
Created symlink /etc/systemd/system/multi-user.target.wants/[emailprotected] → /lib/systemd/[emailprotected].

Tell me a name for the client.
The name must consist of alphanumeric character. It may also include an underscore or a dash.
Client name: ANTIGAFAM2023 <= ICI ON CREE NOTRE UTILISATEUR
Client's WireGuard IPv4: 10.66.66.2 <= ICI ON MET BIEN L'IP
Client's WireGuard IPv6: fd42:42:42::2 <= IDEM

#### Vous allez obtenir un QRCODE secret, il s'agit de votre config VPN !
#### Sinon vous pouvez egalement retrouver votre config dans le fichier : /root/wg0-client-ANTIGAFAM2023.conf

#### 4) Sur Mon PC
#### Je dois récupérer un client VPN, ici que j'install : https://download.wireguard.com/windows-client/
#### J'ouvre mon client sur mon PC, en bas à gauche "Ajouter le tunnel" > "Ajouter un tunnel vide" :
#### Je copie/colle sur mon PC ce que je trouve dans /root/wg0-client-ANTIGAFAM2023.conf :
# Nom : *Je nomme mon VPN*
# Clé publique : *Touche à rien*
[Interface]
PrivateKey = mG*****************************c=
Address = 10.66.66.2/32, fd42:42:42::2/128
DNS = 1.1.1.1, 1.0.0.1

[Peer]
PublicKey = uX*********************************o=
PresharedKey = 1/**********************************U=
AllowedIPs = 0.0.0.0/1, 128.0.0.0/2, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.168.0.0/19, 192.168.32.0/20, 192.168.48.0/21, 192.168.57.0/24, 192.168.58.0/23, 192.168.60.0/22, 192.168.64.0/18, 192.168.128.0/17, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/3, ::/1, 8000::/1
Endpoint = 5.199.199.209:51603

#### PS : Si besoin, le calcul d'ip autorisée est assez chiant dans wireguard, du coup il y a des "wireguard calculator" sur GitHub et sur le Net : https://www.procustodibus[...]rd-allowedips-calculator/

#### 5) Je test mon VPN
#### Avant tout, je test mon IPv4 sans VPN : https://ipv4.lafibre.info/ <= "Votre IPv4 publique est y.y.y.y"
#### Je l'active dans wireguard, et je lance mon navigateur pour vérifier que mon VPN fonctionne : https://ifconfig.me <= Je dois voir mon IP VPN (dans mon cas 5.199.199.209)

---------------------------------------------
---------------------------------------------

Voilà, voilà.

[TUTO] Monter son propre serveur VPN Wireguard sur un serveur sur Onche (3)

Mon propos est imaginaire et fictif, il n'implique donc aucun fait ou élément réel et toute ressemblance serait fortuite

[TUTO] Monter son propre serveur VPN Wireguard sur un serveur sur Onche (2024)
Top Articles
Roboquest: How to Get All Power Crystals - Games Fuze
Fact vs Fiction: Winning Time season 2 episode 6 — Did Kareem Abdul-Jabbar’s home catch on fire?
PBC: News & Top Stories
Raleigh Craigs List
Trivago Manhattan
San Fernando Craigslist Pets
BEL MOONEY: Should I leave this boorish, bullying layabout?
Adventhealth Employee Handbook 2022
Td Share The Green Referral Credit
Tate Sweat Lpsg
Understanding Pickleball Court Dimensions: Essential Guide
Fatshark Forums
Olive Onyx Amora
Bobibanking Retail
Church Bingo Halls Near Me
Sites Like SkiptheGames Alternatives
Atl To London Google Flights
Eliud Kipchoge Resting Heart Rate
Lots 8&amp;9 Oak Hill Court, St. Charles, IL 60175 - MLS# 12162199 | CENTURY 21
JPMorgan and 6 More Companies That Are Hiring in 2024, Defying the Layoffs Trend
Autotrader Ford Ranger
Hinzufügen Ihrer Konten zu Microsoft Authenticator
Walmart Supercenter Nearest To My Location
Q Zangle Cvusd
Wolf Of Wall Street Tamil Dubbed Full Movie
That Is No Sword X Kakushi By Nez_R
Course schedule | Fall 2022 | Office of the Registrar
Top 10 Best OSRS Ranged Weapons (Bows + Crowssbows) – FandomSpot
209-929-1099
Dramacool Love In Contract
Preventice Learnworlds
Www Muslima Com
OSRS F2P Melee Combat Guide: Fastest Way From 1-99
Indiana Immediate Care.webpay.md
Sound Of Freedom Showtimes Near Cinergy Midland
Probation中文
What Does It Mean When Hulu Says Exp
Best Th13 Base
Ece 2300 Osu
Armored Beacon Feh
Luchtvaart- en Ruimtevaarttechniek - Technische Universiteit Delft - Studiekeuze123 - Studiekeuze123
ARK Fjordur: Ultimate Resource Guide | Where to Find All Materials - Games Fuze
John Deere Z355R Parts Diagram
Fifty Shades Of Gray 123Movies
Workspace.emory.og
Lhhouston Photos
Apartments for Rent in Buellton, CA - Home Rentals | realtor.com®
Buzzn Dispensary
my Control Vitality Female Support Complex (10 ml)
Nine Star Hegemon Body Art
Southwest Airlines Departures Atlanta
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 6242

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.