RSS
content bg

Algoritma IP Routing

Flowchart IP Routing
algoritma ip routing
algoritma ip routing

Perintah “chattr” pada sistem linux

Seringkali secara tidak sengaja sebuah file penting terhapus atau terubah. Pada sistem linux tidak ada fasilitas undelete, jadi file yang telah terhapus tidak dapat dikembalikan lagi.
Perintah chattr digunakan untuk melindungi sebuah file sehingga tidak akan dapat dihapus ataupun dirubah dengan perintah apapun. Perintah chattr memberikan attribut ” i “ pada file yang dilindungi, perintahnya:
# chattr +i namafile
misalnya:
# chattr +i filepenting.txt
setelah perintah tersebut dijalankan, gunakan perintah ls -l untuk melihat hasilnya:
# ls -l
-rw-r–r– 1 rody rody 223901 Dec 23 18:30 filepenting.txt
Dapat dilihat pada tampilan diatas, ketika perintah ls -l dijalankan, ternyata perubahan yang dilakukan tidak tampak, tetapi ketika file tersebut dihapus, maka akan muncul peringatan bahwa file tersebut dilindungi, tampilannya seperti dibawah ini:
# rm filepenting.txt
rm: remove write-protected reguler file ‘filepenting.txt’? y
rm: cannot remove ‘filepenting.txt’ : Operation not permitted
Jika suatu ketika file ini akan diedit atau dihapus, terlebih dahulu attribut diatas harus dilepas, untuk melepasnya gunakan perintah berikut ini:
# chattr -i namafile
setelah attribut tersebut dilepas, maka file tersebut baru akan dapat dihapus.

Membatasi download extensi tertentu pada mikrotik

Ada beberapa trik yang bisa membatasi download yang sering menghabiskan bandwidth. Bisa menggunakan Squid Proxy dengan fitur delay_pools, bisa juga dengan menggunakan mikrotik. Tetapi menurut saya yang paling ampuh menggunakan squid proxy.
Ini beberapa tahap setting firewall pada mikrotik untuk membatasi download file extensi tertentu:
LIMIT EXTENSION ——————–
ip firewall mangle
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.mp3
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.iso
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.exe
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.rar
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.avi
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.wmv
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.mpeg
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.mpg
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.dat
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.tar.gz
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.tar.bz2
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.zip
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.3gp
add chain=forward action=mark-connection new-connection-mark=limitfile passthrough=yes content=.mp4
add chain=forward action=mark-packet new-packet-mark=down passthrough=noconnection-mark=limitfile

0 komentar:

Posting Komentar