/ip firewall filter
add action=add-src-to-address-list address-list=smtp-spammers address-list-timeout=none-dynamic chain=forward \
dst-port=25 protocol=tcp
add action=drop chain=forward dst-port=25,1443,445,137,139 protocol=tcp
add action=drop chain=forward dst-port=445,137-139 protocol=udp
Batasi Port Keluar yang bikin IP Publik sering kena Blacklist di MikroTik
PHP: Generate Number
<?
// Make an empty array
$numbers = array();
// Loop while there aren't enough numbers
while (count($numbers) < 900) {
$random_number = mt_rand(1000000000, 9999999999);
if (!in_array($random_number, $numbers)) {
// This adds the number to the array
$numbers[] = $random_number;
}
}
foreach ($numbers as $number) {
echo "331701".$number."\n"; // or <br /> if you are using as part of page.
}
?>
Check Port 25 di Mikrotik Terminal
/system telnet alt1.aspmx.l.google.com 25
Set DNS / name-server VyOS
command: set system name-server <address>
set system name-server 1.1.1.1
Codeigniter LIKE with wildcard (%)
$this->db->like('title', 'match', 'before');
// Produces: WHERE title LIKE '%match'
$this->db->like('title', 'match', 'after');
// Produces: WHERE title LIKE 'match%'
$this->db->like('title', 'match', 'both');
// Produces: WHERE title LIKE '%match%'
source:
- https://stackoverflow.com/questions/16226906/codeigniter-like-with-wildcard
- https://stackoverflow.com/questions/44585478/search-query-in-codeigniter
Mikrotik Script: Bulk Set Profile PPP
for routerOS v7.xx
:foreach i in=[/ppp/profile find ] do={ [/ppp/profile set $i queue-type=fq-codel]}
for routerOS v6.xx
:foreach i in=[/ppp profile find ] do={ [/ppp profile set $i queue-type=fq-codel]}
fq-codel type available only on RouterOS version 7.xx