Created
March 9, 2026 06:12
-
-
Save adinata-id/3abebe812a1c4fc9b1a609f99e72eb8a to your computer and use it in GitHub Desktop.
setting tailscale vpn di vps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cek ip route network vps: | |
| command: ip route | |
| conotoh output: | |
| 104.250.118.0/24 | |
| # 1. Install Tailscale (Script resmi otomatis deteksi OS) | |
| curl -fsSL https://tailscale.com/install.sh | sh | |
| # 2. Aktifkan IP Forwarding (Wajib agar traffic bisa lewat) | |
| echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf | |
| echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf | |
| sudo sysctl -p /etc/sysctl.d/99-tailscale.conf | |
| # 3. Jalankan Tailscale sebagai Exit Node & Advertise Route | |
| sudo tailscale up --advertise-exit-node --advertise-routes=104.250.118.0/24 | |
| Buka Tailscale Admin Console. | |
| Cari nama VPS Anda di list machines. | |
| Klik menu tiga titik (...) di sebelah kanan nama VPS > pilih Edit route settings. | |
| Centang kedua opsi ini: | |
| [x] Use as exit node | |
| [x] 104.250.118.0/24 | |
| Klik Save. | |
| Selesai! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment