[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
One Family's Fight Against Grisly Web Photos
The Tragic Story of "Porsche Girl" Nikki Catsouras
Brokensilenze Website
ACTS Occupational and Physical Therapy
Aflac on LinkedIn: Aflac Supplemental Insurance | 22 comments
Triple A Flat Tire Repair Cost
What Is the Z-Track Injection Method?
Fbsm Berkeley
D Drive Not Showing Up—10 Ways To Fix It
Allegheny Clinic Primary Care North
Dd Codeshare
Warped Pocket Dimension
Housing Intranet Unt
Synergy Grand Rapids Public Schools
O'reilly's Iron Mountain Michigan
Starfield PC, XSX | GRYOnline.pl
2503 South Tacoma Way
Fishweather
E41.Ultipro.com
Ap Computer Science Principles Grade Calculator
Waifu Fighter F95
Horseware Deken Amigo Bravo 100gr Donkerblauw - 130/183 | bol
Best Birthday Dinner Los Angeles
Logisch werving en selectie B.V. zoekt een Supply Chain &amp; Logistics Engineer in Coevorden | LinkedIn
Kidcheck Login
Wall Tapestry At Walmart
O'reilly Car Parts Near Me
Dl 646
Kagtwt
Women On Twitch Go Without Makeup To Support A Fellow Streamer
619-354-3954
Netronline Historic Aerials
Embu village mines precious coltan for years 'without knowing its value’
Ticket To Paradise Showtimes Near Laemmle Newhall
Az610 Flight Status
Upc 044376295592
Sinmiedoalban12
Viduthalai Movierulz
Adda Darts
Research Tome Neltharus
Clea-Lacy Juhn: Schwerer Schicksalsschlag kurz nach Zwillingsgeburt
How To Buy Taylor Swift Tickets By Navigating Ticketek's Stress-Inducing System
Craigslist Boats Rochester
Drift Boss 911
Equine Trail Sports
Tattoo Shops Buckhannon Wv
City Of Omaha Efinance
Grand Rapids, Michigan Aviation Weather Report and Forecast
Texture Ids For Custom Glove In Slap Battles
Evil Dead Rise Showtimes Near Regal Destiny Usa
Csuf Mail
Restaurants Near Defy Trampoline Park
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 6591

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.