برای اینکار بهتره از سرور دبین استفاده کنید، روی باقی توزیع های لینوکسها هم جواب میده ولی خب سازگاری بهتری با دبین داره.
https://youtu.be/Fp0zazxtaIs
https://namecheap.pxf.io/BX7m6W
https://dashboard.azaronline.com/order/?aff=790&p=domain
https://m.do.co/c/0fb522deafa4
https://dashboard.azaronline.com/order/?aff=790&p=vps
If you think this project is helpful to you, you may wish to give a 🌟
Feel Free To Donation : ❤️
TRC20:
TGTyqv2MH7dZztMvaP5PKuS9Bma8RY5Pk8
ETH:
0x5b5202a54e5ce4fb25f0d886254eeb07bb088614
echo 'deb http://ftp.debian.org/debian buster-backports main' | sudo tee /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install wireguard
sudo apt install iptables
wg genkey | sudo tee /etc/wireguard/privatekey | wg pubkey | sudo tee /etc/wireguard/publickey
cat privatekey
sudo nano /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.1/24
SaveConfig = true
ListenPort = 51820
PrivateKey = SERVER_PRIVATE_KEY
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
در غیر اینصورت برید به فوروارد IPV4
sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.0.0.1/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE
sudo wg show
interface: wg0
public key: +Vpyku+gjVJuXGR/OXXt6cmBKPdc06Qnm3hpRhMBtxs=
private key: (hidden)
listening port: 51820
ip a show wg0
4: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN
group default qlen 1000
link/none
inet 10.0.0.1/24 scope global wg0
valid_lft forever preferred_lft forever
sysctl net.ipv4.ip_forward=1
sudo systemctl enable wg-quick@wg0
cat publickey
nano /etc/wireguard/wg1.conf
#Change the lines to your keys and ip addr!
[Interface]
PrivateKey = CLIENT_PRIVATE_KEY
Address = 10.0.0.2/24
DNS = 1.1.1.1, 8.8.8.8
[Peer]
PublicKey = SERVER_PUBLIC_KEY
Endpoint = SERVER_IP_ADDRESS:51820
AllowedIPs = 0.0.0.0/0
sudo wg set wg0 peer CLIENT_PUBLIC_KEY allowed-ips 10.0.0.2
Watch wg show
sudo apt install qrencode
cd /etc/wireguard/
qrencode -t ansiutf8 < wg1.conf
https://soft98.ir/internet/ftp-tools/748-winscp.html
https://www.uplooder.net/files/be3aae21a20551904422ee1a170747ec/wire32.zip.html
https://www.uplooder.net/files/6ed0a416f8d537332c710a5664e889dd/wire64.zip.html
https://www.uplooder.net/files/8a52533bbf7bec80224b2f8955795273/android.zip.html
https://www.uplooder.net/files/37a0e4fc0e7d0404595ca31591ddfb66/IOS-Mac.zip.html