Update README.md
This commit is contained in:
@@ -581,60 +581,6 @@ sudo ss -lun | grep 51820
|
||||
|
||||
<details>
|
||||
<summary>For Mobile Clients</summary>
|
||||
|
||||
Resmi WireGuard uygulamasını yükle
|
||||
Add Tunel(+)
|
||||
Scan the QR code
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
<summary>For Desktop Clients</summary>
|
||||
|
||||
<details>
|
||||
<summary>Arch</summary>
|
||||
sudo pacman -S wireguard-tools
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Debian/Ubuntu/Raspberry Pi OS</summary>
|
||||
sudo apt install wireguard
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fedora</summary>
|
||||
sudo dnf install wireguard-tools
|
||||
</details>
|
||||
In your PC
|
||||
sudo nano /etc/wireguard/wg0.conf
|
||||
```
|
||||
[Interface]
|
||||
PrivateKey = DESKTOP_PRIVATE_KEY
|
||||
Address = 10.8.0.3/24
|
||||
PreUp = ip route add VPS_IP/32 via 192.168.1.1 dev enp11s0
|
||||
PostDown = ip route del VPS_IP/32 via 192.168.1.1 dev enp11s0
|
||||
|
||||
[Peer]
|
||||
PublicKey = SERVER_PUBLIC_KEY
|
||||
Endpoint = VPS_IP:51820
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
PersistentKeepalive = 25
|
||||
```
|
||||
sudo chmod 600 /etc/wireguard/wg0.conf
|
||||
|
||||
Open VPN -> sudo wg-quick up wg0
|
||||
Close VPN -> sudo wg-quick down wg0
|
||||
Status -> sudo wg
|
||||
|
||||
Otomatic Connect when Pc is opened -> sudo systemctl enable wg-quick@wg0
|
||||
Close that option -> sudo systemctl disable wg-quick@wg0
|
||||
|
||||
If you get connection error delete 'DNS = 1.1.1.1' from your desktop.conf and try again
|
||||
sudo wg-quick up wg0
|
||||
</details>
|
||||
</details>
|
||||
|
||||
|
||||
# Create Client Key
|
||||
cd /etc/wireguard
|
||||
install -m 600 /dev/null phone_private.key
|
||||
@@ -659,19 +605,16 @@ Add this into end of the page
|
||||
PublicKey = PHONE_PUBLIC_KEY
|
||||
AllowedIPs = 10.8.0.2/32
|
||||
```
|
||||
|
||||
systemctl restart wg-quick@wg0
|
||||
wg
|
||||
>peer: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
>allowed ips: 10.8.0.2/32
|
||||
|
||||
|
||||
# Phone.conf
|
||||
Phone Public Key -> sudo cat phone_private.key
|
||||
Server Public Key -> sudo cat /etc/wireguard/server_public.key
|
||||
export TERM=xterm-256color
|
||||
nano /etc/wireguard/phone.conf
|
||||
|
||||
```
|
||||
[Interface]
|
||||
PrivateKey = PHONE_PRIVATE_KEY
|
||||
@@ -684,11 +627,107 @@ Endpoint = VPS_IP:51820
|
||||
AllowedIPs = 0.0.0.0/0, ::/0
|
||||
PersistentKeepalive = 25
|
||||
```
|
||||
|
||||
QR Code -> qrencode -t ansiutf8 < /etc/wireguard/phone.conf
|
||||
|
||||
|
||||
|
||||
Resmi WireGuard uygulamasını yükle
|
||||
Add Tunel(+)
|
||||
Scan the QR code
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
<summary>For Desktop Clients</summary>
|
||||
|
||||
<details>
|
||||
<summary>Arch</summary>
|
||||
sudo pacman -S wireguard-tools
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Debian/Ubuntu/Raspberry Pi OS</summary>
|
||||
sudo apt install wireguard
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fedora</summary>
|
||||
sudo dnf install wireguard-tools
|
||||
</details>
|
||||
|
||||
# Create Desktop Client Key
|
||||
|
||||
cd /etc/wireguard
|
||||
install -m 600 /dev/null desktop_private.key
|
||||
wg genkey | tee desktop_private.key > /dev/null
|
||||
wg pubkey < desktop_private.key > desktop_public.key
|
||||
chmod 600 desktop_private.key
|
||||
chmod 644 desktop_public.key
|
||||
|
||||
Test -> ls -l phone_*
|
||||
>-rw------- desktop_private.key
|
||||
>-rw-r--r-- desktop_public.key
|
||||
|
||||
|
||||
Desktop Public Key -> sudo cat desktop_public.key
|
||||
|
||||
export TERM=xterm-256color
|
||||
nano /etc/wireguard/wg0.conf
|
||||
Add this into end of the page
|
||||
```
|
||||
[Peer]
|
||||
# Desktop
|
||||
PublicKey = DESKTOP_PUBLIC_KEY
|
||||
AllowedIPs = 10.8.0.3/32
|
||||
```
|
||||
|
||||
systemctl restart wg-quick@wg0
|
||||
wg
|
||||
>peer: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
>allowed ips: 10.8.0.2/32
|
||||
|
||||
|
||||
# desktop.conf
|
||||
Desktop Public Key -> sudo cat desktop_private.key
|
||||
Server Public Key -> sudo cat /etc/wireguard/server_public.key
|
||||
|
||||
In your PC
|
||||
sudo nano /etc/wireguard/wg0.conf
|
||||
|
||||
```
|
||||
[Interface]
|
||||
PrivateKey = DESKTOP_PRIVATE_KEY
|
||||
Address = 10.8.0.3/24
|
||||
PreUp = ip route add VPS_IP/32 via 192.168.1.1 dev enp11s0
|
||||
PostDown = ip route del VPS_IP/32 via 192.168.1.1 dev enp11s0
|
||||
|
||||
[Peer]
|
||||
PublicKey = SERVER_PUBLIC_KEY
|
||||
Endpoint = VPS_IP:51820
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
PersistentKeepalive = 25
|
||||
```
|
||||
|
||||
|
||||
sudo chmod 600 /etc/wireguard/wg0.conf
|
||||
|
||||
Open VPN -> sudo wg-quick up wg0
|
||||
Close VPN -> sudo wg-quick down wg0
|
||||
Status -> sudo wg
|
||||
|
||||
Otomatic Connect when Pc is opened -> sudo systemctl enable wg-quick@wg0
|
||||
Close that option -> sudo systemctl disable wg-quick@wg0
|
||||
|
||||
If you get connection error delete 'DNS = 1.1.1.1' from your desktop.conf and try again
|
||||
sudo wg-quick up wg0
|
||||
</details>
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wg
|
||||
|
||||
Reference in New Issue
Block a user