Senin, 30 Maret 2020

, ,

How To Add Swap on CentOS 7


Introduction

One of the easiest ways to make your server more responsive, and guard against out-of-memory errors in your application, is to add some swap space. Swap is an area on a storage drive where the operating system can temporarily store data that it can no longer hold in memory.

This gives you the ability to increase the amount of information that your server can keep in its working memory, with some caveats. Reading from and writing to swap is slower than using memory, but it can provide a good safety net for when your server is low on memory.

Without swap, a server that runs out of memory may start killing applications to free up memory, or even crash. This can cause you to lose unsaved data or experience downtime. To ensure reliable data access, some applications require swap to function.

In this guide, we will cover how to create and enable a swap file on a CentOS 7 server.

Note
Although swap is generally recommended for systems utilizing traditional spinning hard drives, using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage. Doing so can impact the reliability of the underlying hardware for you and your neighbors.
If you need to improve the performance of your server, we recommend upgrading your Droplet. This will lead to better results in general and will decrease the likelihood of contributing to hardware issues that can affect your service.

Prerequisites

Before you begin with this guide, there are a few steps that need to be completed first.

You will need a CentOS 7 server installed and configured with a non-root user that has sudo privileges. If you haven’t done this yet, you can run through steps 1-4 in the CentOS 7 initial server setup guide to create this account.

Once you have your non-root user, you can use it to SSH into your CentOS server and continue with the installation of your swap file.

Check the System for Swap Information
Before we begin, we should take a look at our server’s storage to see if we already have some swap space available. While we can have multiple swap files or swap partitions, one should generally be enough.

We can see if the system has any configured swap by using swapon, a general-purpose swap utility. With the -s flag, swapon will display a summary of swap usage and availability on our storage device:

swapon -s
If nothing is returned by the command, then the summary was empty and no swap file exists.

Another way of checking for swap space is with the free utility, which shows us the system’s overall memory usage. We can see our current memory and swap usage (in megabytes) by typing:

free -m
              total       used       free     shared    buffers     cached
Mem:          3953        315       3637          8         11        107
-/+ buffers/cache:        196       3756
Swap:            0          0       4095
As you can see, our total swap space in the system is 0. This matches what we saw with swapon.

Check Available Storage Space

The typical way of allocating space for swap is to use a separate partition that is dedicated to the task. However, altering the partition scheme is not always possible due to hardware or software constraints. Fortunately, we can just as easily create a swap file that resides on an existing partition.

Before we do this, we should be aware of our current drive usage. We can get this information by typing:

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        59G  1.5G   55G   3% /
devtmpfs        2.0G     0  2.0G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           2.0G  8.3M  2.0G   1% /run
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
Note: the -h flag simply tells dh to output drive information in a human-friendly reading format. For example, instead of outputting the raw number of memory blocks in a partition, df -h will tell us the space usage and availability in M (for megabytes) or G (for gigabytes).

As you can see on the first line, our storage partition has 59 gigabytes available, so we have quite a bit of space to work with. Keep in mind that this is on a fresh, medium-sized VPS instance, so your actual usage might be very different.

Although there are many opinions about the appropriate size of a swap space, it really depends on your application requirements and your personal preferences. Generally, an amount equal to or double the amount of memory on your system is a good starting point.

Since my system has 4 gigabytes of memory, and doubling that would take a larger chunk from my storage space than I am willing to part with, I will create a swap space of 4 gigabytes to match my system’s memory.

Create a Swap File

Now that we know our available storage space, we can go about creating a swap file within our filesystem. We will create a file called swapfile in our root (/) directory, though you can name the file something else if you prefer. The file must allocate the amount of space that we want for our swap file, and it should be created in one contiguous block.

The best way to do this is to use the dd utility. This command will create a 4 gigabyte file:

sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
After entering your password to authorize sudo privileges, the swap file will be created. This can take a few moments, then the prompt will be returned to you. We can verify that the correct amount of space was reserved for swap by using ls:

ls -lh /swapfile
-rw-r--r-- 1 root root 4.0G Oct 30 11:00 /swapfile
As you can see, our swap file was created with the correct amount of space set aside.

Enable a Swap File

Right now, our file is created, but our system does not know that this is supposed to be used for swap. We need to tell our system to format this file as swap and then enable it.

Before we do that, we should adjust the permissions on our swap file so that it isn’t readable by anyone besides the root account. Allowing other users to read or write to this file would be a huge security risk. We can lock down the permissions with chmod:

sudo chmod 600 /swapfile
This will restrict both read and write permissions to the root account only. We can verify that the swap file has the correct permissions by using ls -lh again:

ls -lh /swapfile
-rw------- 1 root root 4.0G Oct 30 11:00 /swapfile
Now that our swap file is more secure, we can tell our system to set up the swap space for use by typing:

sudo mkswap /swapfile
Setting up swapspace version 1, size = 4194300 KiB
no label, UUID=b99230bb-21af-47bc-8c37-de41129c39bf  
Our swap file is now ready to be used as a swap space. We can begin using it by typing:

sudo swapon /swapfile

To verify that the procedure was successful, we can check whether our system reports swap space now:

swapon -s
Filename                Type        Size    Used    Priority
/swapfile               file        4194300 0     -1
This output confirms that we have a new swap file. We can use the free utility again to corroborate our findings:

free -m
             total       used       free     shared    buffers     cached
Mem:          3953        315       3637          8         11        107
-/+ buffers/cache:        196       3756
Swap:         4095          0       4095   
Our swap has been set up successfully, and our operating system will begin to use it as needed.

Make the Swap File Permanent

Our swap file is enabled at the moment, but when we reboot, the server will not automatically enable the file for use. We can change that by modifying the fstab file, which is a table that manages filesystems and partitions.

Edit the file with sudo privileges in your text editor:

sudo nano /etc/fstab
At the bottom of the file, you need to add a line that will tell the operating system to automatically use the swap file that you created:

/swapfile   swap    swap    sw  0   0
When you are finished adding the line, you can save and close the file. The server will check this file on each bootup, so the swap file will be ready for use from now on.

Tweak Your Swap Settings (Optional)

There are a few options that you can configure that will have an impact on your system’s performance when dealing with swap. These configurations are optional in most cases, and the changes that you make will depend on your application needs and your personal preference.

Swappiness

The swappiness parameter determines how often your system swaps data out of memory to the swap space. This is a value between 0 and 100 that represents the percentage of memory usage that will trigger the use of swap.

With values close to zero, the system will not swap data to the drive unless absolutely necessary. Remember, interactions with the swap file are “expensive” in that they are a lot slower than interactions with memory, and this difference in read and write speed can cause a significant reduction in an application’s performance. Telling the system not to rely on the swap as much will generally make your system faster.

Values that are closer to 100 will try to put more data into swap in an effort to keep more memory free. Depending on your applications’ memory profile, or what you are using your server for, this might be the better choice in some cases.

We can see the current swappiness value by reading the swappiness configuration file:

cat /proc/sys/vm/swappiness
30
CentOS 7 defaults to a swappiness setting of 30, which is a fair middle ground for most desktops and local servers. For a VPS system, we’d probably want to move it closer to 0.

We can set the swappiness to a different value by using the sysctl command. For instance, to set the swappiness to 10, we could type:

sudo sysctl vm.swappiness=10
vm.swappiness = 10
This setting will persist until the next reboot. To make the setting persist between reboots, we can add the outputted line to our sysctl configuration file:

sudo nano /etc/sysctl.conf

Add your swappiness setting to the bottom of the file:


vm.swappiness = 10   
When you are finished adding the line, you can save and close the file. The server will now automatically set the swappiness to the value you declared on each bootup.

Cache Pressure

Another related value that you might want to modify is the vfs_cache_pressure. This setting affects the storage of special filesystem metadata entries. Constantly reading and refreshing this information is generally very costly, so storing it on the cache for longer is excellent for your system’s performance.

You can see the current value of this cache pressure by querying the proc filesystem again:

cat /proc/sys/vm/vfs_cache_pressure
100   
As it is currently configured, our system removes inode information from the cache far too quickly. We can set this to a more conservative setting, like 50, by using sysctl:

sudo sysctl vm.vfs_cache_pressure=50
vm.vfs_cache_pressure = 50
Again, this is only valid for our current session. We can change that by adding it to our configuration file, like we did with our swappiness setting:

sudo nano /etc/sysctl.conf
At the bottom, add the line that specifies your new value:

vm.vfs_cache_pressure = 50
When you are finished adding the line, you can save and close the file. The server will now automatically set the cache pressure to the value you declared on each bootup.

Conclusion
By following the steps in this guide, you will have given your server some breathing room in terms of memory usage. Swap space is incredibly useful in avoiding some common problems.

If you are running into OOM (out of memory) errors, or if you find that your system is unable to use the applications that you need, the best solution is to optimize your application configurations or upgrade your server. However, configuring swap space can give you more flexibility and can help buy you time on a less powerful server.



sumber : DO
Continue reading How To Add Swap on CentOS 7

Senin, 24 Februari 2020

Name Servers Digital Ocean


Name server adalah nama dari sebuah web server yang digunakan untuk mengarahkan domain ke server tertentu dan biasanya ditulis dengan format ns1.namasever dan lain-lain. Penamaan tersebut berbeda-beda setiap layanan dan tergantung dengan konfigurasi yang dilakukan. Name server dibutuhkan bagi seorang pengembang web dan pengelolaan hosting untuk mengarahkan kemana arah alamat tujuan web berasal. berikut adalah sample name server digital ocean.

$ mhost ns1.digitalocean.com
ns1.digitalocean.com.  (unsigned)  1800  A     173.245.58.51
ns1.digitalocean.com.  (unsigned)  1800  AAAA  2400:cb00:2049:1::adf5:3a33
$ mhost ns2.digitalocean.com
ns2.digitalocean.com.  (unsigned)  1800  A     173.245.59.41
ns2.digitalocean.com.  (unsigned)  1800  AAAA  2400:cb00:2049:1::adf5:3b29
$ mhost ns3.digitalocean.com
ns3.digitalocean.com.  (unsigned)  300  A     198.41.222.173
ns3.digitalocean.com.  (unsigned)  300  AAAA  2400:cb00:2049:1::c629:dead
Continue reading Name Servers Digital Ocean

Senin, 17 Februari 2020

Bagaimana Cara Mengaktifkan /etc/rc.local di systemd Debian 10 Buster

Bagaimana Cara Mengaktifkan /etc/rc.local di systemd Debian 10 Buster



Bagaimana cara membuat aplikasi berjalan bersama sistem operasi Debian atau running as service atau bisa disebut juga setiap komputer server di hidupkan, aplikasi dapat berjalan otomatis dengan sistem operasi. Cara untuk membuat aplikasi dipanggil atau dijalankan otomatis setiap kali komputer dinyalakan adalah dengan menambahkan script pada file etc/rc.local . Seorang sistem administrator biasanya menggunakan perintah untuk menjalankan aplikasinya di /etc/rc.local, namun pada versi terbaru Debian 9 keatas fitur ini tidak dimunculkan lagi oleh pengembang sistem operasi debian. Buat yang sudah terbiasa menggunakan rc.local, berikut adalah cara untuk mengaktifkan fitur /etc/rc.local pada Systemd di Debian 10 Buster.

Mengaktifkan atau Enable /etc/rc.local di systemd

jika kamu menginputkan teks dibawah ini

sudo systemctl status rc-local

maka akan muncul


● rc-local.service - /etc/rc.local Compatibility
 Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
 Active: failed (Result: exit-code) since Thu 2015-11-26 23:54:58 CST; 59s ago
 Process: 1001 ExecStart=/etc/rc.local start (code=exited, status=1/FAILURE)
Nov 26 23:54:57 vivid rc.local[1001]: File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 920, in require
Nov 26 23:54:57 vivid rc.local[1001]: needed = self.resolve(parse_requirements(requirements))
Nov 26 23:54:57 vivid rc.local[1001]: File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 807, in resolve
Nov 26 23:54:57 vivid rc.local[1001]: raise DistributionNotFound(req)
Nov 26 23:54:57 vivid rc.local[1001]: pkg_resources.DistributionNotFound: shadowsocks==2.8.2
Nov 26 23:54:58 vivid sudo[1008]: pam_unix(sudo:session): session closed for user root
Nov 26 23:54:58 vivid systemd[1]: rc-local.service: control process exited, code=exited status=1
Nov 26 23:54:58 vivid systemd[1]: Failed to start /etc/rc.local Compatibility.
Nov 26 23:54:58 vivid systemd[1]: Unit rc-local.service entered failed state.
Nov 26 23:54:58 vivid systemd[1]: rc-local.service failed.
dan jika kamu mencoba mengaktifkan /etc/rc.local untuk menjalankannya saat booting dengan perintah


sudo systemctl enable rc-local

maka munculnya

The unit files have no [Install] section. They are not meant to be enabled
 using systemctl.
 Possible reasons for having this kind of units are:
 1) A unit may be statically enabled by being symlinked from another unit's
 .wants/ or .requires/ directory.
 2) A unit's purpose may be to act as a helper for some other unit which has
 a requirement dependency on it.
 3) A unit may be started when needed via activation (socket, path, timer,
 D-Bus, udev, scripted systemctl call, ...).

Solusi


Dari perihal tersebut, diketahui bahwa /etc/rc.local tidaklah terinstal dan systemd tidak bisa mengaktifkannya
cara pertama yang harus kita lakukan adalah membuat filenya


sudo nano /etc/systemd/system/rc-local.service

kemudian tambahkan perintah tulisan berikut ini

[Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=multi-user.target

simpan dan tutup nano editor dengan tombol ctrl+x dan y untuk simpan
selanjutnya, berikan hak akses file /etc/rc.local tadi dengan cara


sudo chmod +x /etc/rc.local

setelah itu enable /etc/rc.local saat booting dengan perintah

sudo systemctl enable rc-local

hasilnya

Created symlink from /etc/systemd/system/multi-user.target.wants/rc-local.service to /etc/systemd/system/rc-local.service.

sekarang, jalankan dan lihat statusnya

sudo systemctl start rc-local.service
sudo systemctl status rc-local.service

Hasilnya
● rc-local.service - /etc/rc.local Compatibility
 Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset: enabled)
 Active: active (running) since Fri 2015-11-27 00:32:56 CST; 14min ago
 Process: 879 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
 Main PID: 880 (watch)
 CGroup: /system.slice/rc-local.service

Note. bila dalam sistem debian kamu tidak memiliki file rc.local maka masukkan berikut

sudo nano /etc/rc.local

kemudian paste kan kode berikut ini

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0

close dengan ctrl+x dan y untuk simpan

Sekian, Semoga Bermanfaat

Continue reading Bagaimana Cara Mengaktifkan /etc/rc.local di systemd Debian 10 Buster

Jumat, 24 Januari 2020

Cara Install dan Setting Centos Web Panel di VPS Digital Ocean dengan Sistem Operasi Centos 7

Pada post kali ini saya akan membagikan tutorial bagaimana cara install dan setting Centos Web Panel di VPS Digital Ocean dengan sistem operasi Centos 7.



Centos Web Panel (CWP) adalah salah satu control panel web hosting yang bisa digunakan secara gratis.

Centos Web Panel cukup banyak penggunanya. Meskipun kepopulerannnya tidak sebesar VestaCP atau Cyberpanel.

Saya sendiri lebih nyaman menggunakan Centos Web Panel. User interface Centos Web Panel memang terlihat jadul. Tetapi fitur-fiturnya cukup lengkap dan cukup mudah digunakan. Proses instalasinyapun mudah dan cepat.

Kali ini saya akan membagikan tutorial bagaimana cara install dan konfigurasi Centos Web Panel di VPS Digital Ocean dengan sistem operasi Centos 7.

Mengapa saya memilih VPS Digital Ocean ? Karena Digital Ocean cukup populer. Banyak penggunanya. Kinerja VPS nya cukup stabil. Harganya cukup terjangkau, Digital Ocean menyediakan produk VPS mulai dari yang paling murah $5.

Menyiapkan Domain

Sebelum Anda mengikuti tutorial ini, Anda harus menyiapkan sebuah domain yang sudah aktif. Domain inilah di mana kita akan menginstall Centos Web Panel dan juga website.

Domain bisa Anda beli di penyedia domain, di dalam atau di luar negeri. Misalnya di Rumahweb, Namecheap, Godaddy dan lainnya.

Jika domain Anda sudah aktif silahkan Anda ikuti tutorial berikut.

Membuat VPS Digital Ocean dengan Sistem Operasi Centos 7

Untuk membuat VPS di Digital Ocean kita harus login di dashboard Digital Ocean di alamat berikut : https://cloud.digitalocean.com/login



Login dengan akun Digital Ocean Anda.

Klik Create > Droplets





Pada bagian Choose an image pilih CentOS 7.5 x64



Pada bagian Choose a size pilih spesifikasi droplet yang ingin Anda pakai. Di sini saya memilih Droplet dengan spesifikasi : Memory 1 GB, 1 vCPU, 25 GB SSD Disk, 1 TB Transfer.



Pada bagian Choose a datacenter region, pilih lokasi datacenter, di sini saya memilih Singapore.



Pada bagian Choose a hostname, isi dengan nama hostname yang Anda inginkan.



Pada bagian hostname ini sebaiknya Anda isi dengan subdomain dari domain di mana Anda ingin menginstall Centos Web Panel.

Format hostname seperti berikut : subdomain.domainanda.com

Di sini saya akan menggunakan domain milik saya yaitu ciuzz.com. Saya akan membuat hostname dengan subdomain panel. Jadi nama hostname yang saya buat adalah : panel.ciuzz.com

Setelah Anda mengisi kolom hostname, klik Create.

Detail Droplet (VPS) akan dikirim ke email Anda. Silahkan Anda cek kotak masuk di email Anda.

Langkah selanjutnya adalah login ke dashboard di mana Anda membeli domain.

Kita akan menghubungkan domain kita dengan IP VPS. Kemudian kita juga akan membuat subdomain yang akan kita hubungkan juga dengan IP VPS.

Cara Menghubungkan Domain dan Subdomain dengan IP VPS

Login ke dashboard di mana Anda membeli domain. Masuk ke bagian managemen DNS.

Buatlah 2 buah A record seperti contoh berikut.




A record pertama, kita buat host @ kita hubungkan dengan IP VPS

A record kedua, kita buat host panel kita hubungkan dengan IP VPS.

Untuk pembuatan A record di penyedia domain lain pada dasarnya sama. Tapi jika Anda mengalami kesulitan bisa Anda tanyakan ke penyedia domain yang Anda gunakan.

Install Centos Web Panel di VPS Digital Ocean dengan Sistem Operasi Centos 7

Setelah pembuatan VPS dan A record selesai maka langkah selanjutnya adalah sajian utama kita, yaitu menginstall Centos Web Panel.

Instalasi Centos Web Panel ini cukup mudah dan cepat. Silahkan disimak.

1. Login ke VPS

Untuk login kita bisa menggunakan aplikasi Putty di Windows. Atau jika Anda menggunakan Android Anda bisa menggunakan JuiceSSH.

Silahkan Anda masukkan IP VPS di kolom Host Name. Kemudian klik Open.



Biasanya akan muncul Security Alert. Klik Yes.



Pada bagian login as : isi dengan mengetikkan root lalu tekan enter.



Pada bagian password : isi dengan password VPS yang bisa Anda temukan di email Anda tadi. Lalu tekan enter.



Pada bagian (current) UNIX password : isi dengan mengetikkan password baru yang Anda inginkan lalu tekan enter.



Pada bagian Retype new password : isi dengan mengetikkan lagi password baru yang Anda inginkan lalu tekan enter.



2. Membuat hostname

Langkah ini bisa Anda lewati jika Anda menggunakan VPS Digital Ocean. Silahkan Anda ketikkan perintah berikut :

hostname panel.ciuzz.com

Untuk ciuzz.com silahkan diganti dengan domain Anda.

3. Install wget, ketik perintah berikut :

yum -y install wget

4. Update server, ketik perintah berikut :

yum -y update

5. Reboot server, ketik perintah berikut :

reboot

6. Setelah reboot server biasanya otomatis koneksi putty ke server terputus. Login kembali ke Putty seperti biasa.

7. Pindah direktori ke /usr/local/src, ketik perintah berikut :

cd /usr/local/src

8. Download file installer CWP, ketik perintah berikut :

wget http://centos-webpanel.com/cwp-el7-latest

9. Eksekusi installer, ketik perintah berikut :

sh cwp-el7-latest

Proses instalasi berjalan sekitar 5-10 menit. Setelah instalasi selesai akan ditampilkan detail login CentOS WebPanel Admin dan informasi lainnya seperti gambar berikut.


Silahkan Anda copy informasi tersebut ke notepad. Kemudian tekan enter untuk reboot server.

Login ke Centos WebPanel Admin

Setelah instalasi CWP selesai maka langkah selanjutnya adalah edit nameserver. Caranya login dulu ke Centos WebPanel Admin di alamat yang telah Anda copy di notepad di atas.

Untuk login ke Centos WebPanel Admin ada dua cara :

      • Login tanpa SSL : http://IP_VPS:2030
      • Login dengan SSL : https://IP_VPS:2031


Silahkan Anda pilih cara login yang Anda inginkan. Untuk login yang lebih aman sebaiknya gunakan cara login dengan SSL.


Berikut adalah tampilan awal dari Centos WebPanel Admin.


Edit Nameserver di Centos WebPanel Admin

Untuk melakukan edit nameserver perhatikan bagian Navigation yang ada di sebelah kiri. Kemudian klik DNS Functions > Edit Nameservers IPs



Terdapat empat kolom. Dua kolom di sebelah kiri adalah nama nameserver. Dua kolom di sebelah kanan adalah IP VPS. Silahkan Anda isi seperti contoh di gambar berikut. Untuk ciuzz.com silahkan Anda ganti dengan domain Anda. Untuk IP VPS di sebelah kanan gunakan IP VPS Anda.


Setelah mengisi semua kolom, klik Save changes.

Register Nameserver di Dashboard Domain

Langkah selanjutnya adalah register nameserver di dashboard domain.

Di langkah sebelumnya kita sudah membuat dua buah nameserver, yaitu ns1.ciuzz.com dan ns2.ciuzz.com. Dua buah nameserver ini harus kita registrasi di dashboard domain di mana kita membeli domain.

1. Login ke dashboard domain di mana Anda membeli domain

2. Cari menu Private Nameserver atau Personal DNS Server. Di sini kita akan meregister nameserver.

3. Register dua buah nameserver seperti contoh berikut.



4. Langkah terakhir adalah konfigurasi Nameserver menggunakan dua buah nameserver yang sudah Anda register tadi. Caranya klik menu Nameserver, kemudian Anda masukkan dua buah Nameserver seperti contoh berikut. jangan lupa disave.

Penutup

Demikianlah telah saya uraikan bagaimana cara install dan setting Centos Web Panel di VPS Digital Ocean dengan sistem operasi Centos 7. Semoga bermanfaat.


Sumber : kangarif.net
Continue reading Cara Install dan Setting Centos Web Panel di VPS Digital Ocean dengan Sistem Operasi Centos 7

Kamis, 09 Januari 2020

Mengganti Hardisk WD My Cloud


WD MyCloud adalah solusi lengkap bagi pengguna untuk mengelola, mensentralisasi  dan mengamankan konten digital dari semua komputer dan perangkat mobile mereka dan mengakses file-file tersebut dari perangkat apa saja dan dimana saja di dunia. Feb 18, 2014



Berikut adalah cara mengganti harddisk wd my cloud yang error atau mau di upgrade.

youtube video


credit to
https://community.wd.com/t/guide-how-to-unbrick-your-2tb-3tb-4tb-my-cloud/93336
http://www.system-rescue-cd.org/Download/
https://www.dognmonkey.com/techs/how-to-upgrade-wd-my-cloud-from-1tb-to-2tb-drive.html
Continue reading Mengganti Hardisk WD My Cloud

Rabu, 08 Januari 2020

Internet lokal mendapatkan Alamat IP dari Publik

How to link Public addresses to Local ones

Using Network Address Translation (NAT), private IP addresses on LAN are replaced by public IP addresses. This lets computers on LAN share public IP addresses.
Nat.jpg
Let us assume two addresses (10.0.0.216 and 10.0.0.217) are assigned to the router. In this example we will 'full NAT' the internal address 192.168.0.4 to the external 10.0.0.216 one while keeping 10.0.0.217 for the router itself as well as for masquerading the internal network. To setup the router follow the steps listed below.
1. Add 10.0.0.216/24 and 10.0.0.217/24 addresses to the router's Public interface and 192.168.0.254/24 to the router's Local interface:
[admin@MikroTik] ip address> add address=10.0.0.216/24 interface=Public
[admin@MikroTik] ip address> add address=10.0.0.217/24 interface=Public
[admin@MikroTik] ip address> add address=192.168.0.254/24 interface=Local
2. Add the default route to the router, but be aware of having two addresses. You should specify the address that the router will be using while talking to the outer networks:
[admin@MikroTik] ip route> add gateway=10.0.0.1 prefsrc=10.0.0.217
3. Add DST-NAT rule allowing access to the internal server from external networks:
[admin@MikroTik] ip firewall nat> add action=dst-nat chain=dstnat \
     dst-address=10.0.0.216/32 to-addresses=192.168.0.4
4. To add SRC-NAT rules allowing the internal server to talk to the outer networks having its source address translated to 10.0.0.216, while translating other internal hosts' source addresses to 10.0.0.217:
[admin@MikroTik] ip firewall nat> add action=src-nat chain=srcnat \
     src-address=192.168.0.4/32 to-addresses=10.0.0.216
[admin@MikroTik] ip firewall nat> add action=src-nat chain=srcnat \
     src-address=192.168.0.0/24 to-addresses=10.0.0.217

sumber : https://wiki.mikrotik.com
Continue reading Internet lokal mendapatkan Alamat IP dari Publik