kali ini gue mau share tutorial tentang mikrotik, beberapa hal yang menarik (buat gue :p ) bakal dibagi di sini, kali ini tentang perangkat android yang ikut pada jaringan mikrotik. Tentunya pada kebingungan ga sih kalo ada perangkat android banyak, semua pada donlot or main game, kebayang gat uh bandwidth kantor diabisin semua ama hape2 android tidak dikenal.
Untuk jaringan yang menggunakan DHCP server, pasti terlihat di DHCP leases hostname perangkat yang mendapatkan IP dari mikrotik, hal ini dapat dimanfaatkan untuk mengelompokkan berdasarkan hostname android untuk ditambahkan secara otomatis di address list. Yang nantinya address list ini akan menjadi sumber segalanya, mau langsung di limit simple queue, atau dilakukan packet marking, atau dirubah jalur routingnya, semuanya bisa asal harus menambah address list.
Jika perangkat android selalu berganti-ganti, maka akan menyulitkan admin jaringan untuk menambahkan IP android tersebut di address list. Nah gue ada script sederhana untuk menambahkan hostname android di DHCP leases untuk dimasukkan kedalam address list.
#untuk menemukan dan memindahkan ke addreas list
:foreach i in=[/ip dhcp-server lease find host-name~"android"] do={
:local hostIP value=[/ip dhcp-server lease get $i value-name=active-address]
Naah..script itu bisa di jalankan di new terminal, seharusnya semua hostname dengan label android akan dipindahkan ke address list android-ip, untuk pelabelan nama sudah ane kasih warna merah, bisa diganti sesuka kalian.
Untuk antisipasi jika ada perangkat android baru yang konek, maka bisa ditambahkan script berikut untuk menghapus address list android-ip dan jalankan lagi script sebelumnya untuk menambahkan data yang lebih baru.
#untuk menemukan dan menghapus
ip firewall address-list remove [find list~"android-ip"]
mikrotik memang perangkat yang istimewa, harganya tidak terlampau mahal jika disbanding kan dengan router-router branded lainnya, tapi fungsi yang didalamnya tidak kalah, sangat fleksibel dan bisa bisa digunakan dengan berbagai cara.
sekian tutorial ini, semoga bisa membantu, jika ada masukan atau sharing tentang mikrotik dll bisa di komenkan di sini atau email juga boleh :
Memblokir Google Play Store sekarang bisa menggunakan fungsi Firewall di MikroTik dengan menambahkan kata kunci pada kolom Content kata berikut:
gvt1
Selanjutnya dapat dilihat pada gambar berikut:
Perhatikan pada gambar terakhir. Baris yang disorot warna biru menampilkan besar data yang berhasil diblokir oleh MikroTik. Berikut tampilan Google Play Store yang diblokir:
Kualitas sinyal WiFi baik, penuh tetapi, Play Store mengalami error "Batas waktu koneksi berakhir". Layanan APK yang telah terinstall tidak terganggu, terlihat pada gambar diatas pada status bar, WhatsApp terhubung sempurna.
Sekian tips dari saya, jangan lupa main-main ke www.forummikrotik.com dimana tips ini saya temukan. Semoga bermanfaat, dan selalu berbagi.
How can I set the system date and time from the command prompt (bash shell)? I don’t have GUI installed and I am login over ssh session. How can I set date under Linux operating systems?
Use the date command to display the current date and time or set the system date / time over ssh session. You can also run the date command from X terminal as root user.
[donotprint][/donotprint]This is useful if the Linux server time and/or date is wrong, and you need to set it to new values from the shell prompt.
You must login as root user to use date command.
Linux Display Current Date and Time
Just type the date command: $ date Sample outputs:
Mon Jan 21 01:31:40 IST 2019
Linux Display The Hardware Clock (RTC)
Type the following hwclock command to read the Hardware Clock and display the time on screen: # hwclock -r OR # hwclock --show $ sudo hwclock --show --verbose OR show it in Coordinated Universal time (UTC): # hwclock --show --utc Sample outputs:
2019-01-21 01:30:50.608410+05:30
Linux Set Date Command Example
Use the following syntax to set new data and time: date --set="STRING" For example, set new data to 2 Oct 2006 18:00:00, type the following command as root user: # date -s "2 OCT 2006 18:00:00" OR # date --set="2 OCT 2006 18:00:00" You can also simplify format using following syntax: # date +%Y%m%d -s "20081128"
Linux Set Time Examples
To set time use the following syntax: # date +%T -s "10:13:13" Where,
10: Hour (hh)
13: Minute (mm)
13: Second (ss)
Use %p locale’s equivalent of either AM or PM, enter: # date +%T%p -s "6:10:30AM" # date +%T%p -s "12:10:30PM"
How do I set the Hardware Clock to the current System Time?
Use the following syntax: # hwclock --systohc OR # hwclock -w
A note about systemd based Linux system
With systemd based system you need to use the timedatectl command to set or view the current date and time. Most modern distro such as RHEL/CentOS v.7.x+, Fedora Linux, Debian, Ubuntu, Arch Linux and other systemd based system need to the timedatectl utility. Please note that the above command should work on modern system too.
timedatectl: Display the current date and time
Type the following command: $ timedatectl
Fig.01: Systemd Linux timedatecetl command to display the current date and time
How do I change the current date using the timedatectl command?
To change the current date, type the following command as root user: # timedatectl set-time YYYY-MM-DD OR $ sudo timedatectl set-time YYYY-MM-DD For example set the current date to 2015-12-01 (1st, Dec, 2015): # timedatectl set-time '2015-12-01' # timedatectl Sample outputs:
Local time: Tue 2015-12-01 00:00:03 EST
Universal time: Tue 2015-12-01 05:00:03 UTC
RTC time: Tue 2015-12-01 05:00:03
Time zone: America/New_York (EST, -0500)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sun 2015-11-01 01:59:59 EDT
Sun 2015-11-01 01:00:00 EST
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2016-03-13 01:59:59 EST
Sun 2016-03-13 03:00:00 EDT
To change both the date and time, use the following syntax: # timedatectl set-time YYYY-MM-DD HH:MM:SS Where,
HH : An hour.
MM : A minute.
SS : A second, all typed in two-digit form.
YYYY: A four-digit year.
MM : A two-digit month.
DD: A two-digit day of the month.
For example, set the date ’23rd Nov 2015′ and time to ‘8:10:40 am’, enter: # timedatectl set-time '2015-11-23 08:10:40' # date
How do I set the current time only?
The syntax is: # timedatectl set-time HH:MM:SS # timedatectl set-time '10:42:43' # date Sample outputs:
Mon Nov 23 08:10:41 EST 2015
How do I set the time zone using timedatectl command?
To see list all available time zones, enter: $ timedatectl list-timezones $ timedatectl list-timezones | more $ timedatectl list-timezones | grep -i asia $ timedatectl list-timezones | grep America/New To set the time zone to ‘Asia/Kolkata’, enter: # timedatectl set-timezone 'Asia/Kolkata' Verify it: # timedatectl
Local time: Mon 2015-11-23 08:17:04 IST
Universal time: Mon 2015-11-23 02:47:04 UTC
RTC time: Mon 2015-11-23 13:16:09
Time zone: Asia/Kolkata (IST, +0530)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
How do I synchronizing the system clock with a remote server using NTP?
Simply type the following command: # timedatectl set-ntp yes Verify it: $ timedatectl Sample outputs:
Local time: Mon 2015-11-23 08:18:49 IST
Universal time: Mon 2015-11-23 02:48:49 UTC
RTC time: Mon 2015-11-23 02:48:50
Time zone: Asia/Kolkata (IST, +0530)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
Conclusion
Linux users can use date command to print or set the system date and time. Systemd based Linux users can use timedatectl to control the system time and date.
You can also set new timzone using this mini-howto.
Did you ever come across the following error when you try to access Moodle, "Coding error detected, it must be fixed by a programmer: Failed to unserialise data from file. Either failed to read, or failed to write."
This usually happens when cache files are corrupted, one probable cause can be improper shutdown of Moodle system.
Here is the solution to fix the issue.
1. Go to Moodle root directory #cd /var/www/html/moodle 2. Run the command #php admin/cli/purge_caches.php
3. Go to moodledata/cache directory
#cd /var/moodledata/cache
4. Remove the cache store directory, DO NOT remove of change the core_component.php file