mirror of
https://github.com/ditatompel/insights.git
synced 2025-01-08 03:12:06 +07:00
Merge pull request #284 from Timothy-Page/patch-1
Merge pull request #284 This merge action was created automatically. Reviewed-by: ditatompel <ditatompel@users.noreply.github.com>
This commit is contained in:
commit
6192441ce1
2 changed files with 27 additions and 9 deletions
|
@ -59,9 +59,16 @@ Pada artikel ini, tujuan kita adalah:
|
|||
|
||||
{{< youtube o_JcLMjYI1A >}}
|
||||
|
||||
> Catatan: Video YouTube diatas tidak secara urut mengikuti artikel ini. Video
|
||||
> tersebut juga menggunakan subnet yang berbeda, jadi sesuaikan sesuai
|
||||
> kebutuhan.
|
||||
> Catatan:
|
||||
>
|
||||
> - Secara default, WireGuard menggunakan UDP port 51820 dan WireGuard-UI
|
||||
> mengikuti konfigurasi tersebut juga. Jika Anda tidak menggunakan port
|
||||
> 51820 seperti yang digunakan di artikel ini, silahkan sesuaikan
|
||||
> [konfigurasi firewall](#mengkonfigurasi-firewall) dan [WireGuard UI
|
||||
> Server Settings](#menggunakan-wireguard-ui) Anda.
|
||||
> - Video YouTube diatas tidak secara urut mengikuti artikel ini. Video
|
||||
> tersebut juga menggunakan subnet yang berbeda, jadi sesuaikan sesuai
|
||||
> kebutuhan.
|
||||
|
||||
## Mempersiapkan Server Anda
|
||||
|
||||
|
@ -83,7 +90,7 @@ sudo sysctl -p
|
|||
Hal tersebut perlu dilakukan supaya _kernel_ mengijinkan melakukan **IP
|
||||
forwarding**.
|
||||
|
||||
### Mengkonfigrasi Firewall
|
||||
### Mengkonfigurasi Firewall
|
||||
|
||||
Anda perlu untuk menambahkan _port_ yang akan digunakan oleh WireGuard _daemon_
|
||||
ke _allow-list firewall_ Anda. Dari bawaan distro **Ubuntu**, **UFW** sudah
|
||||
|
@ -91,10 +98,12 @@ terinstall dan dapat digunakan untuk mengkonfigurasi _firewall_.
|
|||
|
||||
```shell
|
||||
sudo ufw allow OpenSSH
|
||||
sudo ufw allow 80 comment "allow HTTP" # akan digunakan oleh Nginx
|
||||
sudo ufw allow 80 comment "allow HTTP" # akan digunakan oleh Nginx
|
||||
sudo ufw allow 443 comment "allow HTTPS" # akan digunakan oleh Nginx
|
||||
sudo ufw allow proto udp to any port 443 comment "allow QUIC" # Jika konfigurasi Nginx Anda mensupport QUIC
|
||||
sudo ufw allow proto udp to any port 51822 comment "WireGuard listen port"
|
||||
# Sesuaikan perintah ufw dibawah ini dengan WireGuard listen port Anda
|
||||
sudo ufw allow proto udp to any port 51820 comment "WireGuard default listen port"
|
||||
sudo ufw allow proto udp to any port 51822 comment "WireGuard tutorial listen port"
|
||||
```
|
||||
|
||||
> _Perhatikan bahwa saya juga menambahkan **OpenSSH** ke allow list untuk
|
||||
|
|
|
@ -55,8 +55,15 @@ In this guide, our goals:
|
|||
|
||||
{{< youtube o_JcLMjYI1A >}}
|
||||
|
||||
> Note: The YouTube videos above are not in the order of this article. They
|
||||
> also use different IPs & subnets, so adjust them to your needs.
|
||||
> Note:
|
||||
>
|
||||
> - By default, WireGuard listens on UDP port 51820, and WireGuard-UI follows
|
||||
> this configuration by default. If you don't use port 51822 (like this
|
||||
> article does), please adjust [your firewall](#setting-up-firewall) and
|
||||
> [WireGuard UI Server Settings](#using-wireguard-ui) configuration
|
||||
> accordingly.
|
||||
> - The YouTube videos above are not in the order of this article. They
|
||||
> also use different IPs & subnets, so adjust them to your needs.
|
||||
|
||||
## Prepare Your Server
|
||||
|
||||
|
@ -87,7 +94,9 @@ sudo ufw allow OpenSSH
|
|||
sudo ufw allow 80 comment "allow HTTP" # will be used by Nginx
|
||||
sudo ufw allow 443 comment "allow HTTPS" # will be used by Nginx
|
||||
sudo ufw allow proto udp to any port 443 comment "allow QUIC" # If your Nginx support QUIC
|
||||
sudo ufw allow proto udp to any port 51822 comment "WireGuard listen port"
|
||||
# Adjust ufw command below according to your WireGuard listen port
|
||||
sudo ufw allow proto udp to any port 51820 comment "WireGuard default listen port"
|
||||
sudo ufw allow proto udp to any port 51822 comment "WireGuard tutorial listen port"
|
||||
```
|
||||
|
||||
> _Note that I also add **OpenSSH** to allow list to avoid losing connection to
|
||||
|
|
Loading…
Reference in a new issue