--- title: Introduction to WireGuard image: --- :::warning # <center><i class="fa fa-book"></i> Introduction to WireGuard </center> ::: ###### tags: `study` `Raspberry Pi 3B+` `WireGuard` ![](https://i.imgur.com/Hyc9Y0R.png =400x) :::success **🎯 Goals:** - WireGuard Client on Linux ::: :::info :bookmark: **Reference:** - [How to Set Up a WireGuard Client on Linux with .conf File](https://engineerworkshop.com/blog/how-to-set-up-a-wireguard-client-on-linux-with-conf-file) ::: [toc] # Introduce in Linux client - Step ## 1. Install WireGuard: ```cmd= sudo apt install wireguard ``` ## 2. Download your .conf file and move it to the /etc/wireguard/ directory. ## 3. Bring your WireGuard interface up with the following command: ```cmd= sudo wg-quick up <CONFIG-FILE-NAME> ``` > change your config file name ## 4. Check the status of your WG connection: ```cmd= sudo wg ``` ## 5. When you're done with your WG interface, you can take it down: ```cmd= sudo wg-quick down wg0 ``` # Modify WireGuard VPN Connection Settings using GUI ```bash= nm-connection-editor ``` # Introduction in Raspberry Pi3 ## 1.1 Set up and install PiVPN ```shell= curl -L https://install.pivpn.io | bash ``` ## 1.2 Connect the device with WireGuard VPN - Give a name and it will auto creat `.conf` file in `/home/pi/configs` ```shell!= sudo pivpn add ``` - show the QR code to APP conect :::warning It is recommended to use **VNC** or HDMI to watch the QR CODE. If you use **SSH** to display the QR code, the resolution may not be enough and the **scan fails**. ::: ```she= pivpn -qr <MY_VPN_NAME> ``` ## 1.3 Done! and check status ---- <!-- >**Name**: `名稱` --> <style> /* 僅指定連結的圖片去背且靠右模擬置中 */ img[src^="https://i.imgur.com/Hyc9Y0R.png"]{ position: relative; left: 23%; background-color: #fff0; } .title { color: #009933; font-weight:bold; } .highlight { color: #ff4d4d; font-weight:bold; border-bottom:2px red solid; padding-bottom:2px; } </style> <!-- <font class="highlight"> --> <!-- <font class="title"> --> <!-- 縮寫提示 --> <!-- *[O-RAN]:Open Radio Access Network -->