Kau bisa bersembunyi dari kesalahanmu, tapi tidak dari penyesalanmu. Kau bisa bermain dengan dramamu, tapi tidak dengan karmamu.

  • About

    Seorang Teknisi Jaringan yang pernah berkecimpung di Internet Service Provider (ISP) dan akhirnya memutuskan diri untuk menjadi freelancer yang berdomisili di Solo, Surakarta Hadiningrat.

  • Services

    Melayani jasa pasang Internet berbasis Wireless maupun Fiber Optic, Jasa Pasang Tower/Pipa, Pointing Wireless, Setting Router, CCTV, Hotspot, Proxy, Web Server, Network Managed dan Monitoring

  • Contact

    Berbagai saran, kritikan, keluhan dan masukan akan sangat berarti bagi saya. Anda dapat menghubungi/whatsapp saya di nomor:08564-212-8686 atau melalui BBM:2128686

    Showing posts with label Tips-Trik. Show all posts
    Showing posts with label Tips-Trik. Show all posts

    Sunday, May 8, 2022

    sekarang coba lihat list file log :

    find /var/log/ -type f -regex '.*\.[0-9]+\.gz$'
    kl mau delete :
    find /var/log/ -type f -regex '.*\.[0-9]+\.gz$' -delete
    atur ulang journal :
    journalctl --vacuum-time=2days
    journalctl --vacuum-size=100M
    journalctl --vacuum-files=5
    systemctl daemon-reload
    nano /etc/systemd/journald.conf
    SystemMaxUse=100M

    Kemudian reload

    systemctl daemon-reload 

    Kali ini saya akan bagi tips cara create vlan yg aman, tanpa down.
    Seperti pada umumnya, kl mau tambah ip, edit, dll kan kita lakukan service netif restart
    Itu impact nya adalah semua interface di-restart, maka ada downtime.
    Supaya ngga terjadi downtime walau per sekian detik, caranya akan saya jelaskan di bawah. Ini khusus untuk penambahan vlan ya. Simak tips berikut :

    Pastikan sudah ditambahkan value berikut ini di /boot/loader.conf

    if_vlan_load="YES"
    Kemudian, buatlah value di file /etc/rc.conf

    cloned_interfaces="vlan605 vlan606 vlan607 vlan608"
    #MX80
    ifconfig_vlan605="inet 10.60.60.2 netmask 255.255.255.252 vlan 605 vlandev mlxen0"
    #CCR1036
    ifconfig_vlan605_alias0="inet 10.60.61.2 netmask 255.255.255.252"
    #JKTIX
    ifconfig_vlan606="inet 10.60.60.6 netmask 255.255.255.252 vlan 606 vlandev mlxen0"
    #IIX
    ifconfig_vlan607="inet 10.28.75.14 netmask 255.255.255.252 vlan 607 vlandev mlxen0"
    #GGC
    ifconfig_vlan608="inet 10.60.60.10 netmask 255.255.255.252 vlan 608 vlandev mlxen0"
    ifconfig_mlxen0="up"
    jika sudah, kemudian lakukan seperti berikut :
    root@BSDRouter:~ # service netif start vlan608
    Created clone interfaces: vlan608.
    Starting Network: vlan608.
    vlan608: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
            options=680703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
            ether 00:02:c9:a3:0d:21
            inet 10.60.60.10 netmask 0xfffffffc broadcast 10.60.60.11
            groups: vlan
            vlan: 608 vlanpcp: 0 parent interface: mlxen0
            media: Ethernet autoselect (40Gbase-CR4 <full-duplex,rxpause,txpause>)
            status: active
            nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    Cukup mudah bukan ?
    Semoga berguna :))

    Saturday, May 7, 2022

     Ada banyak tool buat monitoring lalu-lintas trafik yg lewat router FreeBSD diantaranya :

    systat -ifstat

    tcpdump 

    netstat 1

    bmon

    trafshow

    trafshow3

    iftop

    vnstat

    dll...


    Semoga berguna :))

    Interface loopback adalah interface internal dalam sebuah router, fungsinya sebagai pref-source untuk mendefinisikan atau mengidentifikasi router itu sendiri. Diantara manfaat penggunaan loopback ip public ini diantaranya :

    • hemat ip public, karena point to point peer bgp bisa menggunakan ip private
    • jika ada peer bgp yang multipath, dapat berganti ganti dengan tetap mengidentifikasi berdasarkan ip yang tertanam pada interface loopback tadi
    • dapat digunakan untuk trobelshoting seperti ping / tracert dengan mencantumkan preference source
    • dll.

    root@BSDRouter:~ # ifconfig lo1
    ifconfig: interface lo1 does not exist
    root@BSDRouter:~ # ifconfig lo1 create
    root@BSDRouter:~ # ifconfig lo1 up
    root@BSDRouter:~ # service netif start lo1
    Starting Network: lo1.
    lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
            options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
            inet 103.166.11.103 netmask 0xffffffff
            groups: lo
            nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

    jangan lupa simpan biar permanen di /etc/rc.conf

    ifconfig_lo1_alias1="inet 103.166.11.103/32"
    ifconfig_lo1="up"

    Thursday, May 5, 2022

    Sebelumnya, load dulu kernel buat vlan
    vi /boot/loader.conf
    if_vlan_load=YES
    Setelah itu reboot. Sebelum create vlan, perhatikan root interface/ethernet nya apa, di sini saya kasih contoh mlxen0 (Mellanox ConectX-3) 2 Port 40Gbps, ini port manteb bgt buat deploy router. Oh iya, cara load driver nya begini :
    kldload mlx4en
    Itu hanya bersifat sementara, kalau mau permanen, tambahkan script di /boot/loader.conf lalu reboot
    mlx4en_load="YES"
    Sekarang tips buat vlan interface. Untuk freebsd versi terbaru, crate vlan lebih mudah, contoh :
    root@BSDRouter:~ # ifconfig vlan605 create
    root@BSDRouter:~ # ifconfig vlan605 vlan 605 vlandev mlxen0
    root@BSDRouter:~ # ifconfig vlan605 inet 10.70.70.2 netmask 255.255.255.252
    root@BSDRouter:~ # ifconfig vlan605
    vlan605: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
            options=680703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
            ether 00:02:c9:a3:0d:21
            inet 10.70.70.2 netmask 0xfffffffc broadcast 10.70.70.3
            groups: vlan
            vlan: 605 vlanpcp: 0 parent interface: mlxen0
            media: Ethernet autoselect (40Gbase-CR4 <full-duplex,rxpause,txpause>)
            status: active
            nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    Lalu, kalau ingin destroy cukup ketikkan begini:
    ifconfig vlan605 destroy
    Kalau ingi disable vlan, ketikkan gini :
    ifconfig vlan605 down
    ok, itu hanya bersifat temporary. Kalau pengen kesimpen dan di load saat booting, pasang script di /etc/rc.conf
    cloned_interfaces="vlan605" ifconfig_vlan605="inet 10.60.60.2 netmask 255.255.255.252 vlan 605 vlandev mlxen0" ifconfig_mlxen0="up"
    setelah itu save, kemudian eksekusi :
    service netif restart
    Semoga Berguna :-)

    Sunday, January 10, 2021

    Dear all,

    Jumpa lagi sama saya. Kali ini saya akan bagi tips untuk membuat link aggregate BGP menggunakan Juniper Feat Mikrotik, dimana ada 2 link metro-e yakni ICONPLUS dan HSP

    Berikut skema-nya :

    [IDC3D] Juniper <> metro-e ICON <> Mikrotik sisi pelanggan
    [IDC3D] Juniper <> metro-e HSP <> Mikrotik sisi pelanggan

    dimana ip point to point-nya

    Juniper 10.0.101.17/30 <> 10.0.101.18/30 Mikrotik
    Juniper 10.0.101.21/30 <> 10.0.101.22/30 Mikrotik

    OK, sekarang kita set di sisi Junipernya

    Kita buat dulu policy LOADBALANCE

    # set policy-options policy-statement LOADBALANCE then load-balance consistent-hash

    nanti hasilnya gini

    policy-statement LOADBALANCE {

        then {

            load-balance consistent-hash;

        }

    }

     

    terus sekarang bikin policy routing filter IN

    # top show policy-options policy-statement DIST-MIRZA-IN

    inactive: term REJECT-TMP {

        then reject;

    }

    term ACCEPT {

        from {

            route-filter 103.146.184.0/23 prefix-length-range /25-/32;

            route-filter 129.9.0.0/16 prefix-length-range /16-/32;

        }

        then accept;

    }

    term REJECT {

        then reject;

    }


    lalu buat policy routing filter OUT

    # top show policy-options policy-statement DIST-MIRZA-OUT

    inactive: term REJECT-TMP {

        then reject;

    }

    term HSP {

        from {

            route-filter 0.0.0.0/0 exact;

        }

        then {

            next-hop 10.0.101.17;

            accept;

        }

    }

    term ICON {

        from {

            route-filter 0.0.0.0/0 exact;

        }

        then {

            next-hop 10.0.101.21;

            accept;

        }

    }

    inactive: term ACCEPT {

        from {

            route-filter 0.0.0.0/0 exact;

        }

        then accept;

    }

    term REJECT {

        then reject;

    }

    Jika sudah, lalu buat bgp peer neighbor

    group MIRZA {

        description Mirza;

        import DIST-MIRZA-IN;

        export DIST-MIRZA-OUT;

        peer-as 65530;

        multipath;

        neighbor 10.0.101.22;

        neighbor 10.0.101.18;

        neighbor 10.0.101.26;

    }

    kemudian cek confignya sudah bener apa belum
    CoreBorder# commit check
    CoreBorder# commit confirm 5 <= masa berlaku 5 menit, bebas silahkan tentukan
    misal sudah ok tinggal gini
    CoreBorder# commit

    Lalu untuk sisi Mikrotiknya setingan BGP Standar, ngga ada setingan khusus.

    Semoga Bermanfaat

    Tuesday, October 20, 2020

    Hai sobat, kali ini saya akan share tips cara untuk membuat auto update tunneling menggunakan protocol GRE.

    skema :

    [ Server Tunnel ] <> INET BROADBAND <> [ Tunnel Client IP Public ]

    jika menggunakan GRE-TUNNEL maka membutuhkan tiktok ip public yang dituangkan dalam remote-address

    mekanismenya :

    • selalu update ip public
    • selalu update remote-address pada gre tunnel

    # Start
    :global currentIP

    # ubah di sini
    :global iface "PPPOE200"
    :global ifacegre "gre-soni"

    # validasi file script
    :if ([:len [/file find name~"$ifacegre"]] = 0 ) do={
    /in gre export file=$ifacegre
    }

    :if ($currentIP  in 10.0.0.0/8) do={
    :log error "re-dial...";
    /in pppoe-client disable $iface
    :delay 2
    /in pppoe-client enable $iface
    }

    /in pppoe-client monitor $iface once do={:set currentIP $"local-address" }

    :global p2p  [/ip address get [:pick [find interface=$ifacegre] 0] network ] 
    :global target [/in gre get $ifacegre remote-address ]

    :global statusgre [/in gre get $ifacegre running ];
    :if ($statusgre != true) do={
    /in gre set $ifacegre local-address=$currentIP
    :log error "$ifacegre error, kirim file"
    /file set contents="/in gre set $ifacegre remote-address=$currentIP" [find name~"$ifacegre"]
    :delay 2

    /tool fetch mode=ftp upload=yes src-path="$ifacegre.rsc" dst-path="$ifacegre.rsc" user=ftp password=ftp port=2121 address="$target"
    }

    Saturday, August 8, 2020

    :global identity [/system identity get name ]

    :global perulangan

    :global statusEth

    :global iface "ether1"


    /int eth monitor $iface once do={

       :if ($"rate" = "100Mbps") do={:set statusEth 0; :set perulangan ($perulangan +1)}

       :if ($"rate" = "100Mbps" && $perulangan =3) do={

           :local pesan "[$identity] %0A$iface = 100Mbps"

           :log error "$iface 100Mbps";

           /tool fetch url="https://api.telegram.org/bot380921546:AAFNlaaxhI063wPAZC-3oNJlefBHz3XgyfI/sendMessage?chat_id=-203533762&text=$pesan" keep-result=no

           /tool fetch url="https://api.telegram.org/bot478500121:AAGnvRMmFHjV25Otf-iUbuN9R1RwjAAM5s8/sendMessage?chat_id=445109932&text=$pesan" keep-result=no

           }

       :if ($"rate" = "1Gbps") do={:set statusEth 1; :set perulangan ($perulangan +1)}

       :if ($"rate" = "1Gbps" && $perulangan =3) do={

           :local pesan "[$identity] %0A$iface = 1Gbps"

           :log warning "$iface 1Gbps"

           /tool fetch url="https://api.telegram.org/bot380921546:AAFNlaaxhI063wPAZC-3oNJlefBHz3XgyfI/sendMessage?chat_id=-203533762&text=$pesan" keep-result=no

           /tool fetch url="https://api.telegram.org/bot478500121:AAGnvRMmFHjV25Otf-iUbuN9R1RwjAAM5s8/sendMessage?chat_id=445109932&text=$pesan" keep-result=no

           }

       :if ($perulangan = 1000 && $statusEth =0 ) do={

           :local pesan "[$identity] %0ACuma Ngabari aja boss%0A$iface = 100Mbps"

           :log warning "Cuma Ngabari, $iface = 100Mbps"

           /tool fetch url="https://api.telegram.org/bot380921546:AAFNlaaxhI063wPAZC-3oNJlefBHz3XgyfI/sendMessage?chat_id=-203533762&text=$pesan" keep-result=no

           /tool fetch url="https://api.telegram.org/bot478500121:AAGnvRMmFHjV25Otf-iUbuN9R1RwjAAM5s8/sendMessage?chat_id=445109932&text=$pesan" keep-result=no

           :set perulangan 1

           }

       }


    Tuesday, July 21, 2020

    :global iface ether5.WAN-ISP
    :global trafikawal
    :global trafik
    # reset tanggal 1
    #/system ntp client set primary-ntp=[:resolve id.pool.ntp.org] enabled=yes
    #/system clock set time-zone-name="Asia/Jakarta"
    :local date [/system clock get date]
    :local tanggal [ :pick $date 4 6 ]
    #:log warning $tanggal
    :if ($tanggal = 1) do={:set trafikawal 0}
    :set trafikawal [/interface get [find name=$iface] rx-byte]
    :if ($trafikawal > 1073741824) do={
    :set trafik ($trafikawal / 1073741824)
    :set trafik ($trafik." GB")
    } else={
    :set trafik ($trafikawal / 1048576)
    :set trafik ($trafik." MB")
    }
    :log warning "trafik $iface = $trafik"
    /in ethernet set $iface comment="$trafikawal"

    Friday, May 29, 2020



    Kali ini saya akan share bagaimana caranya install phpipam.
    phpipam adalah tool untuk me-manage ip public secara web-base. Aplikasi ini canggih sekali dan memudahkan dalam me-manage ip. Check This Out

    # install apache

    apt install ca-certificates apt-transport-https
    apt-get install apache2

    # install mysql-server
    apt-get install mysql-server

    # install php terbaru
    wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
    echo "deb https://packages.sury.org/php/ jessie main" | tee /etc/apt/sources.list.d/php.list

    # update dependensi
    apt update

    # install php-mysql biar konek PHP<>MYSQL
    apt-get install php php-mysql libapache2-mod-php

    # cek dulu php yg terinstall versi berapa
    root@filter1:/var/www/html/phpipam# php -v
    PHP 7.4.6 (cli) (built: May 14 2020 10:54:20) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with Zend OPcache v7.4.6, Copyright (c), by Zend Technologies
    # ok disitu tertera versi 7.4.6 maka yang dianggap adalah versi 7.4 saja

    # install modul yang diperlukan
    apt-get install libgmp-dev php7.4-gmp php7.4-gd php7.4-curl php7.4-mbstring
    apt-get install php-pear

    # enable modul php mbstring
    phpenmod -v 7.4 mbstring

    # enable modul apache2
    a2enmod rewrite

    # restart service apache
    /etc/init.d/apache2 restart

    ok sudah jadi, kemudian ikuti tutorial sebagaimana link berikut :
    https://phpipam.net/documents/installation/

    # git clone phpipam
    git clone --recursive https://github.com/phpipam/phpipam.git /var/www/html/phpipam
    cd /var/ww/html/phpipam/
    mv config.dist.php config.php

    # kemudian edit config.php
    # jangan lupa define('BASE', "/"); diganti define('BASE', "/phpipam/.");
    # karena path nya http://ip-server/phpipam/
    # jika sudah lakukan instalasi
    # selesai

    Thursday, May 7, 2020

    :local IFACE
    :set IFACE INDIHOME

    :local WANIP [/ip address get [find where interface=$IFACE] address];
    :set WANIP [:pick $WANIP 0 ([:len $WANIP]-3) ];

    :if ($WANIP ~"^10[.]") do={
    :log warning "Private ip address found !!!"
    /interface pppoe-client enable $IFACE
    :delay 1
    } else={

    :if ($WANIP ~"^172.") do={
    :log warning "Private ip address found !!!"
    /interface pppoe-client enable $IFACE
    :delay 1
    } else={
    :if ($WANIP ~"^192.") do={
    :log warning "Private ip address found !!!"
    /interface pppoe-client enable $IFACE
    :delay 1
    } else={
    :log warning "Public IP - $WANIP - Found, OK ! No action required"
    }
    }
    }
    :delay 10
    /ip cloud force-update

    Tuesday, May 5, 2020

    :global currentIP
    # ubah di sini
    :global iface "PPPOE"
    /in pppoe-client monitor $iface once do={:set currentIP $"local-address" }
    :if ($currentIP in 10.0.0.0/8) do={
    :log error "re-dial...";
    /in pppoe-client disable $iface
    :delay 2
    /in pppoe-client enable $iface
    }
    # ubah di sini
    :global ifacegre "gre-dewo"
    :global p2p [/ip address get [find interface=$ifacegre] network  ]
    :global target [/in gre get $ifacegre remote-address ]
    # cek berdasarkan running interface gre
    #:if ($statusgre != true) do={
    #/in gre export file=$ifacegre
    #:delay 1
    # cek berdasarkan ping target
    :if ([/ping $p2p count=2] = 0 ) do={
    /in gre export file=$ifacegre
    :delay 1
    /in gre set $ifacegre local-address=$currentIP
    :log error "$ifacegre error, kirim file"
    /file set contents="/in gre set $ifacegre remote-address=$currentIP" [find name~"$ifacegre"]
    :delay 2
    /tool fetch mode=ftp upload=yes src-path="$ifacegre.rsc" dst-path="$ifacegre.rsc" user=ftp password=ftp port=21 address="$target"
    }

    Tuesday, April 21, 2020

    berikut ini cara update timezone pada centos7
    [root@id ~]# date
    Mon Apr 20 17:18:54 UTC 2020
    [root@id ~]# timedatectl set-timezone 'Asia/Jakarta'
    [root@id ~]# timedatectl
          Local time: Tue 2020-04-21 00:19:35 WIB
      Universal time: Mon 2020-04-20 17:19:35 UTC
            RTC time: n/a
           Time zone: Asia/Jakarta (WIB, +0700)
         NTP enabled: n/a
    NTP synchronized: yes
     RTC in local TZ: no
          DST active: n/a
    [root@id ~]# date
    Tue Apr 21 00:19:36 WIB 2020
    [root@id ~]# 

    Saturday, February 22, 2020

    Kali ini saya akan nyimpen catetan enable bash-completion di centos7. Sebagaimana kita tahu, untuk mencari file itu menggunakan perintah locate namafile
    Tapi sebelumnya harus install locate pada debian, kl di centos namanya mlocate.
    Baiklah, langsung saja begini caranya
    [root@server ~]# yum install bash-completion bash-completion-extras -y
    [root@server ~]# yum install mlocate -y
    [root@server ~]# updatedb
    [root@server ~]# locate bash_completion.sh
    [root@server ~]# locate bash_completion.sh
    /etc/profile.d/bash_completion.sh
    [root@server ~]# source /etc/profile.d/bash_completion.sh 
    [root@server ~]# logout 
    jika sudah, coba lakukan yum install [tab]
    disana tertera semua perintah lanjutan.

    Monday, February 17, 2020

    install mysql-server di centos
    wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
    rpm -Uvh mysql80-community-release-el7-1.noarch.rpm
    yum install mysql-server -y
    systemctl start mysqld
    systemctl status mysqld
    clear
    grep 'temporary password' /var/log/mysqld.log | awk '{print "password mysql: " $13}'
    echo "silahkan diganti dengan command mysql_secure_installation"

    Thursday, January 30, 2020

    Hai, kali ini saya akan share cara bikin virtual host ke vps kita.
    Yang pertama, pastikan buat record IN A dulu ke ip public vps kita, kemudian kita login ke vps dan tambahkan file /etc/apache2/sites-enabled/lg.yam.net.id.conf
    <VirtualHost *:80>
        ServerAdmin noc@yam.net.id
        ServerName lg.yam.net.id
        ServerAlias www.lg.yam.net.id
        DocumentRoot /var/www/html/lg
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    kemudian lakukan perintah a2ensite lg.yam.net.id.conf
    lalu restart apachenya service apache2 restart

    Monday, January 27, 2020



    Halo, jumpa lagi,

    Kita akan belajar bagaimana caranya bikin smokeping latency grapher, semacem ping monitoring gitu lah, yang tujuannya biar monitor berapa sih ping dari server ke target remote dan disertakan dengan log nya, jam sekian intermittent, dlsb.

    Baiklah, pertama tama, install dahulu 

    apt install sendmail sendmail-bin mailutils
    lalu
    mkdir -m 700 /etc/mail/authinfo 
    lalu edit file gmail-smtp-auth
     /etc/mail/authinfo/gmail-smtp-auth
     kemudian isikan
    AuthInfo: "U:root" "I:USER@gmail.com" "P:GMAIL_USER_PASSWORD"
    sesuaikan dengan email gmail anda dan passwordnya

    sekarang generate sendmail gmail authentication
    makemap hash /etc/mail/authinfo/gmail-smtp-auth < /etc/mail/authinfo/gmail-smtp-auth
    jika sudah akan terbentuk file /etc/mail/authinfo/gmail-smtp-auth.db

    kemudian edit file /etc/mail/sendmail.mc

    di baris paling bawah, ubah setingan seperti berikut ini
    dnl #
    dnl # Defining Gmail Smarthost for sendmail
    define(`SMART_HOST',`[smtp.gmail.com]')dnl
    define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
    define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
    define(`confAUTH_OPTIONS', `A p')dnl
    TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
    define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
    FEATURE(`authinfo',`hash -o /etc/mail/authinfo/gmail-smtp-auth.db')dnl
    dnl #
    dnl # Default Mailer setup
    MAILER_DEFINITIONS
    MAILER(`local')dnl
    MAILER(`smtp')dnl
    kemudian eksekusi
    make -C /etc/mail
    ...
    Creating /etc/mail/relay-domains
    # Optional file...
    Updating Makefile ...
    Reading configuration from /etc/mail/sendmail.conf.
    Validating configuration.
    Creating /etc/mail/Makefile...
    Updating sendmail.cf ...
    The following file(s) have changed:
      /etc/mail/relay-domains /etc/mail/sendmail.cf
    ** ** You should issue `/etc/init.d/sendmail reload` ** **
    make: Leaving directory '/etc/mail'
    DONE!

    jangan lupa reload sendmailnya /etc/init.d/sendmail reload
    untuk testnya silahkan bisa lakukan seperti berikut :

    echo "This is a test for sendmail gmail relay" | sendmail test-user@gmail.com

    Sunday, January 12, 2020


    Kali ini akan saya share script untuk blokir unbound berdasarkan list porn StevenBlack.
    Syarat penggunaan script ini adalah jika unbound telah berhasil diinstall dan berjalan dengan baik tanpa error. Jangan lupa install dahulu dos2unix jika belum terinstall, caranya
    apt install dos2unix -y
    Baiklah, silahkan buat file convert.sh, kemudian chmod 777 convert.sh
    # list of ads domain names
    array=( https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts )
    for i in "${array[@]}"
    do
    wget $i -O w
    grep -v " #\|<td>\|<p>\|<meta>\|<link>\|<title>\|href\|title=\|=\|<" w > adsList.txt
    rm w
    dos2unix adsList.txt
    # remove host syntax and clean file
    sed -i 's/0.0.0.0//g' adsList.txt
    sed -i 's/127.0.0.1//g' adsList.txt
    sed -i 's/localhost//g' adsList.txt
    sed -i 's/.localdomain//g' adsList.txt
    # remove commentary after domain name
    sed -i 's/#.*//' adsList.txt
    # remove tabulation character and carriage return
    sed -i "s/\t//g" adsList.txt
    sed -i "s/\r//g" adsList.txt
    # remove useless space
    sed -i 's/ //g' adsList.txt
    # remove empty lines
    sed -i '/^\s*$/d' adsList.txt
    # add prefix and suffix for unbound
    sed -i "s/.*/local-zone: \"&\" static/" adsList.txt
    cat adsList.txt >> adsListFinal.txt
    done
    # order list by name, it didn't cost a lot and could maybe increase unbound performance
    sort adsListFinal.txt -o adsListFinal.txt
    # remove duplicate ads domain in order to avoid warning with Unbound
    uniq adsListFinal.txt > adslist.txt
    # remove tempory files
    rm adsListFinal.txt adsList.txt
    kemudian eksekusi ./convert.sh 
    dari hasil script di atas akan muncul file adsList.txt, kemudian pindahkan ke /etc/unbound/unbound.conf.d/
    kemudian laukan pengecekan
    root@DNS-20-10:/home/rahox # unbound-checkconf
    unbound-checkconf: no errors in /etc/unbound/unbound.conf
    jika dipastikan tidak error silahkan reload atau restart unbound dengan cara
    unbound-control reload 
    atau
    unbound-control restart
    Jika sudah, lakukan pengecekan seperti berikut, pastikan /etc/resolv.conf sudah diarahkan ke 127.0.0.1
    root@DNS-20-10:/home/rahox # nslookup xnxx.com
    Server:         127.0.0.1
    Address:        127.0.0.1#53
    ** server can't find xnxx.com: NXDOMAIN

    Thursday, November 14, 2019

    # source : https://nsrc.org/workshops/ws-files/2011/sanog17/exercises/exercises-smokeping.html
    # Note that all IP addresses in this file are false, to prevent some
    # machine falling under a deadly DOS storm because all users keep
    # the same addresses in their config.
    
    *** General ***
    
    ################################################
    # DON'T TOUCH UNLESS YOU KNOW WHAT YOU'RE DOING
    # BETWEEN THESE MARKS!
    ################################################
    sendmail = /usr/sbin/sendmail
    imgcache = /var/www/smokeping
    imgurl   = ../smokeping
    datadir  = /var/lib/smokeping
    piddir   = /var/run/smokeping
    smokemail = /etc/smokeping/smokemail
    tmail    = /etc/smokeping/tmail
    ################################################
    # END OF DON'T TOUCH SECTION
    ################################################
    
    
    # Please edit this to suit your installation
    #
    # If you have a fully qualified domain name, then you should add this to all
    # occurrences of "noc".
    #
    owner    = The NOCMeister
    contact  = monitor@noc
    cgiurl   = http://noc/cgi-bin/smokeping.cgi
    mailhost = localhost 
    # specify this to get syslog logging
    syslogfacility = local0
    # each probe is now run in its own process
    # disable this to revert to the old behaviour
    # concurrentprobes = no
    
    *** Alerts ***
    to = monitor@noc
    from = smokealert@noc
    
    +bigloss
    type = loss
    # in percent
    pattern = ==0%,==0%,==0%,==0%,>0%,>0%,>0%
    comment = suddenly there is packet loss
    
    +someloss
    type = loss
    # in percent
    pattern = >0%,*12*,>0%,*12*,>0%
    comment = loss 3 times  in a row
    
    +startloss
    type = loss
    # in percent
    pattern = ==S,>0%,>0%,>0%
    comment = loss at startup
    
    +rttdetect
    type = rtt
    # in milli seconds
    pattern = <10,<10,<10,<10,<10,<100,>100,>100,>100
    comment = routing messed up again ?
    
    +hostdown
    type = loss
    # in percent
    pattern = ==0%,==0%,==0%, ==U
    comment = no reply
    
    +lossdetect
    type = loss
    # in percent
    pattern = ==0%,==0%,==0%,==0%,>20%,>20%,>20%
    comment = suddenly there is packet loss
    
    
    
    
    *** Database ***
    
    step     = 300
    pings    = 20
    
    # consfn mrhb steps total
    
    AVERAGE  0.5   1  1008
    AVERAGE  0.5  12  4320
        MIN  0.5  12  4320
        MAX  0.5  12  4320
    AVERAGE  0.5 144   720
        MAX  0.5 144   720
        MIN  0.5 144   720
    
    *** Presentation ***
    
    template = /etc/smokeping/basepage.html
    
    + overview 
    
    width = 600
    height = 50
    range = 10h
    
    + detail
    
    width = 600
    height = 200
    unison_tolerance = 2
    
    "Last 3 Hours"    3h
    "Last 30 Hours"   30h
    "Last 10 Days"    10d
    "Last 400 Days"   400d
    
    *** Probes ***
    
    + FPing
    binary = /usr/bin/fping
    
    + EchoPingHttp
    
    + DNS
    binary = /usr/bin/dig
    pings = 5
    step = 180
    
    
    
    *** Targets ***
    
    probe = FPing
    
    ## You have to edit and uncomment all what you want below this.
    # Please, refer to smokeping_config man page for more info
    # The given adresses aren't real to avoid DoS.
    
    menu = Top
    title = Network Latency Grapher
    remark = intERLab at AIT Network Operations and Management Workshop \
             sample SmokePing site 
    
    + Local
    
    menu = APRICOT 2008 
    title = Network Management Workshop 
    
    #
    ####### LATENCY ########
    #
    
    ++ Latency
    
    menu = Latency
    title = Measure of Latency using icmp ping
    
    +++ LocalMachine 
    
    menu = NOC 
    title = The NOC@intERLab
    host = localhost
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    #++ NOCSquid
    #
    #menu = The NOC Squid
    #title = www-cache / HTTP for noc@apricot2008
    #probe = EchoPingHttp
    #host = localhost
    #port = 8080 # use the squid port
    #url = http://localhost/
    #
    
    #
    ## You should edit this for your particular class setup.
    ## For each PC if you have a fully qualified domain name,
    ## you should add this as well.
    ##
    #
    
    +++ PC1
    
    menu = pc1
    title = pc1
    host = pc1
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC2
    
    menu = pc2
    title = pc2
    host = pc2
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC3
    
    menu = pc3
    title = pc3
    host = pc3
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC4
    
    menu = pc4
    title = pc4
    host = pc4
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC5
    
    menu = pc5
    title = pc5
    host = pc5
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC6
    
    menu = pc6
    title = pc6
    host = pc6
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC7
    
    menu = pc7
    title = pc7
    host = pc7
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC8
    
    menu = pc8
    title = pc8
    host = pc8
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC9
    
    menu = pc9
    title = pc9
    host = pc9
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC10
    
    menu = pc10
    title = pc10
    host = pc10
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC11
    
    menu = pc11
    title = pc11
    host = pc11
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC12
    
    menu = pc12
    title = pc12
    host = pc12
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC13
    
    menu = pc13
    title = pc13
    host = pc13
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    +++ PC14
    
    menu = pc14
    title = pc14
    host = pc14
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC15
    
    menu = pc15
    title = pc15
    host = pc15
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    #
    ####### APACHE ########
    #
    
    #
    # You should edit this for your particular class setup.
    # For each PC if you have a fully qualified domain name,
    # you should add this as well.
    #
    
    ++ Apache
    
    menu = HTTP
    title = Apache (http) service
    
    +++ NOC
    
    menu = NOC
    title = Apache 2 Server for noc
    probe = FPing
    host = localhost
    
    +++ PC1
    
    menu = PC1 
    title = Apache 2 Server for pc1
    probe = FPing
    host = pc1
    
    +++ PC2
    
    menu = PC2 
    title = Apache 2 Server for pc2
    probe = FPing
    host = pc2
    
    +++ PC3
    
    menu = PC3 
    title = Apache 2 Server for pc3
    probe = FPing
    host = pc3
    
    +++ PC4
    
    menu = PC4 
    title = Apache 2 Server for pc4
    probe = FPing
    host = pc4
    
    +++ PC5
    
    menu = PC5 
    title = Apache 2 Server for pc5
    probe = FPing
    host = pc5
    
    +++ PC6
    
    menu = PC6 
    title = Apache 2 Server for pc6
    probe = FPing
    host = pc6
    
    +++ PC7
    
    menu = PC7 
    title = Apache 2 Server for pc7
    probe = FPing
    host = pc7
    
    +++ PC8
    
    menu = PC8 
    title = Apache 2 Server for pc8
    probe = FPing
    host = pc8
    
    +++ PC9
    
    menu = PC9 
    title = Apache 2 Server for pc9
    probe = FPing
    host = pc9
    
    +++ PC10
    
    menu = PC10 
    title = Apache 2 Server for pc10
    probe = FPing
    host = pc10
    
    +++ PC11
    
    menu = PC11 
    title = Apache 2 Server for pc11
    probe = FPing
    host = pc11
    
    +++ PC12
    
    menu = PC12 
    title = Apache 2 Server for pc12
    probe = FPing
    host = pc12
    
    +++ PC13
    
    menu = PC13 
    title = Apache 2 Server for pc13
    probe = FPing
    host = pc13
    
    +++ PC14
    
    menu = PC14 
    title = Apache 2 Server for pc14
    probe = FPing
    host = pc14
    
    +++ PC15
    
    menu = PC15 
    title = Apache 2 Server for pc15
    probe = FPing
    host = pc15
    
    #
    ####### APACHE ########
    #
    
    ++ DNS 
    
    probe = DNS
    menu = DNS 
    title = DNS (name server latency)
    
    
    +++ NOC
    
    menu = NOC
    title = Name Server Latency for noc
    host = noc 
    
    #
    ####### WORLD ########
    #
    
    + World
    
    menu = World
    title = Worldwide Connectivity
    
    ++ Africa
    
    menu = Africa
    title = African Connectivity
    
    +++ SouthAfrica
    
    menu = AfNOG
    title = African Network Operators Group
    host = afnog.org
    
    ++ NorthAmerica
    
    menu = North America
    title = North American Connectivity
    
    +++ USA
    
    menu = USA
    title = Select US Servers
    
    ++++ NSRC
    
    menu = NSRC
    title = NSRC (Eugene, Oregon, USA)
    host = nsrc.org
    
    ++++ WRC
    
    menu = WRC
    title = ISOC Workshop Resource Centre (Eugene, Oregon, USA)
    host = ws.edu.isoc.org
    
    ++++ shell
    
    menu = shell.uoregon.edu
    title = Main User Box, University of Oregon (Eugene, Oregon, USA)
    host = shell.uoregon.edu
    
    ++ SouthAmerica
    
    menu = South America
    title =South American Connectivity
    
    +++ Chile
    
    menu = Chile
    title = sageduck.org
    host = sageduck.org
    
    
    #
    ####### Multi Targe ########
    #
    
    #+ MultiTarget 
    
    #menu = MultiTarget 
    #title = Multi Target Graph of ping Latency  
    
    #++ NorthAmerica 
    
    #menu = NorthAmerica 
    #title = North American Servers
    #host = shell.uoregon.edu \
    #       nsrc.org \
    #       psg.com
    #alerts = bigloss,rttdetect 
    

    Monday, September 9, 2019


    Kali ini saya akan share tips menambahkan gadget ke dalam addresslist mikrotik

    :local newDynamics value=[/ip dhcp-server lease find dynamic=yes];
    :local newList value="";
    :foreach i in=[$newDynamics] do={
    :local dynamicIP [/ip dhcp-server lease get $i address];
    :local dynamicMAC [/ip dhcp-server lease get $i mac-address];
    :local dynamicHOST [/ip dhcp-server lease get $i host-name];
    :if ($dynamicHOST~"(Andro|andro|Redmi|redmi|Vivo|vivo|Iphone|iphone|Galaxy|galaxy|BLACKBER)") do={
          /ip firewall address-list add list=cidr_hs_office address=$dynamicIP comment=$dynamicHOST
          :log warning "$dynamicIP added"
          }
    }
    script diatas silahkan tambahkan pada system => scheduler