User contributions for Ardika Sulistija

A user with 226 edits. Account created on 13 May 2024.
Jump to: navigation, search
Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)

27 August 2024

  • 00:1500:15, 27 August 2024 diff hist +6,933 N Fdisk & GdiskCreated page with "If you do not know whether the VM uses MBR or GPT partitions, log into the VM as root and enter one of the following commands. * **fdisk -l /dev/xvda** - For MBR partitions, the operating system will be shown in the Disklabel type field. # fdisk -l /dev/xvda Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/xvd..." current
  • 00:1400:14, 27 August 2024 diff hist +1,336 N Fail2banCreated page with "<b>Fail2ban</b> - a set of server and client programs to limit brute force authentication attempts. ====How to set up fail2ban for ssh:==== ---- 1) Install fail2ban</br> 2) Create a new file by copying jail.conf to a new file called jail.local ‘cp jail.conf jail.local’ 3) Configure jail.local: <b>Bantime</b>; number of seconds that a host is banned. <b>Findtime</b>; the max amount of time to complete the login process. If they don’t do it, they will be banned..." current
  • 00:1400:14, 27 August 2024 diff hist +186 N FIPSCreated page with "====How to check if FIPS is enabled==== ---- Check that FIPS mode is enabled: $ fips-mode-setup --check FIPS mode is enabled. ====Kernel Parameter for enabling FIPS==== ---- fips=1" current
  • 00:1400:14, 27 August 2024 diff hist +2,384 N ExcelCreated page with "====Sort a Table by IP Address==== ---- #. Create a new column to the left of the <b>IP Address</b> column. Let's call it the <b>Sorted</b> column #. Copy the IP addresses from the <b>IP Address column</b> to the new column (<b>Sorted</b>) #. In the <b>Sorted</b> column, use the "find and replace" feature to remove the first three octets so that you are left with the last octet only ##. For example, it the IP addresses are "10.240.5.4", then find "10.240.5." and replace..." current
  • 00:1300:13, 27 August 2024 diff hist +2,169 N EthtoolCreated page with "<b>ethtool</b> - query or control network driver and hardware settings. Use this command to verify that your link is up (the Ethernet is physically connected to the network). https://www.poftut.com/linux-ethtool-tutorial-usage-examples/ ====Is it plugged in?==== ---- On a physical server, with physical cables connected to them, it would probably look like: $ sudo ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10bas..." current
  • 00:1300:13, 27 August 2024 diff hist +1,388 N Ephemeral PortCreated page with " What is an <B>ephemeral port</B>? It is a port that is only used for short period. It is typically used by a client when it connects to a server. The range is usually 49152 through 65535 but does vary. The client end of a connection typically uses a high port number allocated for short term use. ---- Other definitions:</br> [https://www.techopedia.com/definition/19157/ephemeral-port Techopedia:]</br> In client-server processes that use Transmission Control Protoco..." current
  • 00:1200:12, 27 August 2024 diff hist +5,431 N Environment VariablesCreated page with "====How to set environment variables in Linux? (<b>proxy</b> examples)==== ---- Check current proxy configuration status (https_proxy/https_proxy)/ This variable will show if there is a proxy server configured on the system: # echo $http_proxy # echo $https_proxy Set up proxy without username and password # export http_proxy=http://SERVER:PORT/ # export https_proxy=http://SERVER:PORT/ # export no_proxy=localhost,127.0.0.1,169.254.169.254,.amazonaws.com..." current
  • 00:1200:12, 27 August 2024 diff hist +766 N EntropyCreated page with "Reference: https://major.io/2007/07/01/check-available-entropy-in-linux/ Check available entropy in Linux Sometimes servers just have the weirdest SSL problems ever. In some of these situations, the entropy has been drained. Entropy is the measure of the random numbers available from /dev/urandom, and if you run out, you can’t make SSL connections. To check the status of your server’s entropy, just run the following: # cat /proc/sys/kernel/random/entropy_avail If i..." current
  • 00:1200:12, 27 August 2024 diff hist +6,553 N ElastiCacheCreated page with "====How to install Redis-cli==== ---- How to install Redis-cli on Amazon Linux 2: $ sudo yum -y install openssl-devel gcc $ wget http://download.redis.io/redis-stable.tar.gz $ tar xvzf redis-stable.tar.gz $ cd redis-stable $ make distclean $ make redis-cli BUILD_TLS=yes $ sudo install -m 755 src/redis-cli /usr/local/bin/ ==== Is there downtime when changing node type? (scaling up)==== ---- Reference:</br> [1] Cluster mode disabled </br> https://docs.aws.amazon..." current
  • 00:1000:10, 27 August 2024 diff hist +4,424 N EFSCreated page with "<b>EFS</b> - Elastic Filesystem ====Other methods besides DD==== ---- * How can I copy data to and from Amazon EFS in parallel to maximize performance on my EC2 instance?</br> https://aws.amazon.com/premiumsupport/knowledge-center/efs-copy-data-in-parallel/ DD is not parallel, so there are other methods to create files much quicker than DD. Below is a process on how you can do so: 1) Create ten thousand small files in your local storage on your instance. $ mkdir /t..." current
  • 00:1000:10, 27 August 2024 diff hist +59,529 N ECSCreated page with "<b>ECS</b> - Amazon Elastic Container Service https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html Related Topics: <b>Docker</b>, <b>Docker Troubleshooting and CLI</b>, <b>ECR</b> Really good blog post about how ECS manages CPU and memory resources: https://aws.amazon.com/blogs/containers/how-amazon-ecs-manages-cpu-and-memory-resources/ ====ECS Components==== ---- =====<u><b>Cluster</b></u>==..." current
  • 00:1000:10, 27 August 2024 diff hist +6,756 N ECRCreated page with "* <b>Docker</b> * <b>Docker Troubleshooting and CLI</b> ---- <b>ECR</b> - Amazon Elastic Container Registry * A fully managed private docker container registry service that makes it easy to store, pull, and push docker images securely. * ECR automatically encrypts images at rest using S3 server-side encryption and transfers your container images over HTTPS. * ECR uses AWS S3 service in the back-end to host images in a Hig..." current
  • 00:0900:09, 27 August 2024 diff hist +14,227 N EC2Created page with "the default user name for the AMI that you used to launch your instance: * For <b>Amazon Linux 2</b> or the <b>Amazon Linux</b> AMI, the user name is <b>ec2-user</b>. * For a <b>CentOS</b> AMI, the user name is <b>centos</b>. * For a <b>Debian</b> AMI, the user name is <b>admin</b>. * For a <b>Fedora</b> AMI, the user name is <b>ec2-user</b> or <b>fedora</b>. * For a <b>RHEL</b> AMI, the user name is <b>ec2-user</b> or <b>root</b>. * For a <b>SUSE</b> AMI, the user..." current
  • 00:0900:09, 27 August 2024 diff hist +3,693 N EBSCreated page with " ====How to list and delete EBS Snapshots in Bulk==== ---- How to list all EBS snapshots: https://aws.amazon.com/premiumsupport/knowledge-center/ebs-volume-snapshot-ec2-instance/ How to delete EBS snapshots in bulk: * This deletes all EBS snapshots created before 2020-07-28: $ for i in $(aws ec2 describe-snapshots --owner-ids self --query 'Snapshots[?StartTime<=`2020-07-28`].SnapshotId' --output text); do aws ec2 delete-snapshot --snapshot-id $i; sleep 5; done; * An..." current

21 August 2024

  • 14:4914:49, 21 August 2024 diff hist +3,527 N DuCreated page with " <b>du</b> - estimate file space usage. Summarizes disk usage of each FILE, recursively for directories. The two commands (df & du) reports their figures from different sources, and changes to the filesystems are not always considered in the same way. The disk free command (abbreviated to "df") is the standard Linux/Unix command used to display available disk space for the file systems. The "df" command uses the statvfs() system call and asks the file system for the c..." current
  • 14:4914:49, 21 August 2024 diff hist +2,207 N DracutCreated page with "In Red Hat Enterprise Linux (RHEL), dracut typically runs automatically when you install a new kernel. During the kernel installation process, dracut is invoked to create a new initial RAM filesystem (initramfs) image. This initramfs image is necessary for the system to boot with the new kernel, as it contains the drivers and modules required to mount the root filesystem and start the boot process. The new initramfs image is usually placed in the /boot directory alongsi..." current
  • 14:4914:49, 21 August 2024 diff hist +224 N Dos2unixCreated page with " <B>dos2unix</b> - DOS/Mac to Unix and vice versa text file format converter. ----- Install: yum -y install dos2unix apt-get install dos2unix Convert Dos -> Unix dos2unix [file] Convert Unix -> Dos unix2dos [file]" current
  • 14:4814:48, 21 August 2024 diff hist +28,861 N Docker Troubleshooting and CLICreated page with "* <b>Docker</b> (Main page) * <b>ECR</b> ---- ====<u>Common Docker CLI commands and troubleshooting concepts</u>==== * The <b>$ docker pull</b> command allows you to download an image or set of images (i.e. repository). * The <b>$ docker images</b> command allows you to list the currently downloaded images. * The <b>$ docker build</b> command builds an image from a Dockerfile and a context. The build's context is processed..." current
  • 14:4814:48, 21 August 2024 diff hist +57,402 N DockerCreated page with "* <b>Docker Troubleshooting and CLI</b> * <b>ECR</b> ====Containers vs Virtual Machines==== ---- center|class=img-responsive <b>Virtual machines</b> (<b>VMs</b>) are an abstraction of physical hardware turning one server into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, one or more apps, necessary binar..." current
  • 14:4814:48, 21 August 2024 diff hist +462 N DnfCreated page with "For <b>Yum, Apt, and Repos</b> stuff, refer to the <b>Yum, Apt, and Repos</b> page. ====Dnf==== ---- <b>DNF</b> is the modern successor to Yum, featuring improved speed, efficiency, and enhanced dependency resolution capabilities. More information: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-software-packages_configuring-basic-system-settings#doc-wrapper" current
  • 14:4814:48, 21 August 2024 diff hist +95 N DmesgCreated page with "https://www.tecmint.com/dmesg-commands/ ====View Dmesg in Real-time==== ---- dmesg --follow" current
  • 14:4714:47, 21 August 2024 diff hist +212 N DigCreated page with "UNDER CONSTRUCTION, PLEASE VISIT BACK SOON. Add notes from gdrive https://stackpointer.io/internet/get-authoritative-dns-for-domain/435/ https://www.rootusers.com/12-dig-command-examples-to-query-dns-in-linux/" current
  • 14:4714:47, 21 August 2024 diff hist +185 N DiffCreated page with "https://www.geeksforgeeks.org/diff-command-linux-examples/ sudo diff sosreport-A/ sosreport-B/ | grep differ sudo diff -qr sosreport-A/ sosreport-B/ | grep differ (this one better)" current
  • 14:4714:47, 21 August 2024 diff hist +2,954 N DfCreated page with " <b>df</b> - DISK FREE; Report file system disk space. Df shows the available sizes on your <b>disk partition</b>. Tells you what percentage of the disk is occupied. Shows you what's mounted. ====How To Use Df==== ---- =====Basic Uses===== ---- df df -ah $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 3.7G 0 3.7G 0% /dev tmpfs 3.7G 0 3.7G 0% /dev/shm tmpfs..." current
  • 14:4714:47, 21 August 2024 diff hist +14,949 N Device Mapper MultipathCreated page with "====What is Device Mapper Multipathing?==== ---- What is Multipath? • Multipath is a storage network design technique that allows for fault tolerance or increased throughput by providing multiple concurrent physical connections (paths) from the storage to the individual host systems. multipathd and multipath internally use WWIDs to identify devices. WWIDs are also used as map names by default. ——— Device Mapper Multipathing (DM-Multipath) is a native multipat..." current
  • 14:4614:46, 21 August 2024 diff hist +4,911 N DdCreated page with " <b>dd</b> - convert and copy a file. REALLY GOOD ARTICLE: https://www.computernetworkingnotes.com/linux-tutorials/generate-or-create-a-large-text-file-in-linux.html ===How to use dd=== ---- This command will create a file of size <b>count*bs</b>, in which the below will create a file of 1 MB: dd if=/dev/zero of=file.txt count=1024 bs=1024 * <b>/dev/zero</b> is a special file in Unix-like operating systems that provides as many null characters as are read from i..." current
  • 14:4614:46, 21 August 2024 diff hist +16,419 N DNSCreated page with "DNS (Domain Name Server) ====How I have my websites' DNS records set up==== ---- Before proceeding with the [https://dikapedia.com/wiki/SSL_/_TLS#How_to_install_Let.27s_Encrypt_with_Certbot_on_Amazon_Linux_2_.28Super_Easy.29 Let's Encrypt steps to configure SSL cert], I configured my DNS records with the following (on namecheap): * A record - @ - 23.20.238.64 * A record - www - 23.20.238.64 ====DNS==== ---- https://en.wikipedia.org/wiki/Domain_Name_System Good video..." current
  • 14:4614:46, 21 August 2024 diff hist +1,221 N DHCPCreated page with " DHCP - DORA https://ipwithease.com/understanding-dora-process-in-dhcp/ ====dhclient==== ---- <b>dchlient</b> - the Dynamic Host Configuration Protocol (DHCP) Client used to allow a client to connect to a DHCP server. * You need this if you are not booting up using a static IP address!! dhclient configuration files: $ which dhclient /usr/sbin/dhclient # Another way of checking if dhclient is installed # Run as root $ dhclient status && dhclient --version..." current
  • 14:4514:45, 21 August 2024 diff hist +10,387 N CurlCreated page with " <b>curl</b> - transfers a URL. Or make HTTP requests (or HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELENET, LDAP or FILE). https://www.thegeekstuff.com/2012/04/curl-examples/ ---- * Useful for testing web servers at the application level, testing an application's endpoint or connectivity, or checking if a service is healthy. * HTTP uses TCP so if curl works then TCP (and lower levels) must be working, too. Can be used in many different ways: * Designed to work wi..." current
  • 14:4514:45, 21 August 2024 diff hist +3,157 N CronCreated page with " <b>crond</b> - daemon to execute scheduled commands. <b>crontab</b> - Used to schedule repetitive tasks/commands. *must be root* Good info: * https://cronitor.io/cron-reference/5-places-cron-jobs-live * https://www.geeksforgeeks.org/crontab-in-linux-with-examples/ * https://crontab.guru/ * https://unix.stackexchange.com/questions/212703/crontab-error-no-crontab-for-use * https://serverfault.com/questions/449651/why-is-my-crontab-not-working-and-how-can-i-troubleshoo..." current
  • 14:4414:44, 21 August 2024 diff hist +249 N CpCreated page with "From cp manpage: -p same as --preserve=mode,ownership,timestamps --preserve[=ATTR_LIST] preserve the specified attributes (default: mode,ownership,timestamps), if possible additional attributes: context, links, xattr, all" current
  • 14:4414:44, 21 August 2024 diff hist +1,826 N Core DumpsCreated page with "Terminology For Unix systems, the term "core dump" generally refers to a dump of the state of an individual process. The term "core dump" is also used in the context of NetWare, but in that context it refers to a dump of the state of a complete system. The equivalent of a NetWare core dump for Unix systems is typically called a "system crash dump" or "kernel crash dump". Core dump analysis Core dumps can be a valuable source of information in certain troubleshooting s..." current
  • 14:4414:44, 21 August 2024 diff hist +572 N Context SwitchCreated page with "<b>Context Switching</b> is when CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via context switch. * Context-switch time is overhead; the system does no useful work while switching. The more complex the OS and the <b>PCB</b> --the longer the context switch. * Context switches are costly as it destroys the TLB buffer. A <b>translation lookaside buffer (TLB)..." current
  • 14:4314:43, 21 August 2024 diff hist +1,461 N CloudFormationCreated page with "====How to create Redis (cluster mode enabled) with 1 shard using YAML==== ---- <b>CacheParameterGroupName</b> is key to making it cluster mode enabled: AWSTemplateFormatVersion: 2010-09-09 Resources: myReplicationGroup: Type: AWS::ElastiCache::ReplicationGroup DeletionPolicy: Retain Properties: AtRestEncryptionEnabled: true AutomaticFailoverEnabled: true CacheParameterGroupName: 'default.redis5.0.clust..." current
  • 14:4314:43, 21 August 2024 diff hist +11,990 N CloudEndureCreated page with "====CloudEndure log files==== ---- * Installation log file: <b>./cloudendure.log</b> ** Generated during the agent installation process. ** Located in the directory from which the installation process was initiated. * Agent Logs: <b>/var/lib/cloudendure/agent.log.0</b> ====How to start/stop the CloudEndure Agent==== ---- sudo /var/lib/cloudendure/runAgent.sh sudo /var/lib/cloudendure/stopAgent.sh * <b>Note</b>: stop / starting of the agent causes re-replicati..." current
  • 14:4314:43, 21 August 2024 diff hist +9,082 N Cloud-Init and User-DataCreated page with "===Cloud-Init=== ---- add notes: https://cloudinit.readthedocs.io/en/latest/topics/dir_layout.html <b>Cloud-init</b> is the industry standard multi-distribution method for cross-platform cloud instance initialization. It is supported across all major public cloud providers, provisioning systems for private cloud infrastructure, and bare-metal installations. Cloud instances are initialized from a disk image and instance data: Cloud metadata User data (optional) Vendo..." current
  • 14:4314:43, 21 August 2024 diff hist +2,627 N ChrootCreated page with "* Very important to bind /dev since the passwd command makes use of /dev/random which needs to actually exist Robert's way (This example shows how to change a password while chrooted): (all sudo) mount /dev/xvdf1 /mnt mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys mount -o bind /dev /mnt/dev mount -o bind /run /mnt/run #This one was recommended but I didn't end up using it chroot /mnt passwd [username] exit umount /mnt/{dev,sys,proc} umo..." current
  • 14:4214:42, 21 August 2024 diff hist +112 N ChromeCreated page with "Chrome Policy Template json file for Linux: https://gist.github.com/meets2tarun/2161e544f4c458c2f07641cafbdd186d" current
  • 14:4214:42, 21 August 2024 diff hist +14,800 N Centrify/DelineaCreated page with "This is the Centrify for UNIX/Linux/Mac Command Line Cheat Sheet<br> Ref: https://centrifying.blogspot.com/2016/02/centrify-for-unix-cli-cheat-sheet.html ====AD-bridging commands ("ad" commands)==== ---- <b>adcheck</b> - check OS, network and AD readiness for Centrify DirectControl To check the system with domain (e.g. corp.contoso.com) $ adcheck corp.contoso.com To only perform OS checks $ adcheck --test os To only perform network-related tests $ adcheck --test n..." current
  • 14:4214:42, 21 August 2024 diff hist +594 N CPanelCreated page with "The cPanel & WHM Log Files https://docs.cpanel.net/knowledge-base/cpanel-product/the-cpanel-log-files/ ====File Manager==== ---- If you don't have direct access to the underlying server of the website but you have access to cPanel, you can use cPanel to access the website files (i.e. public_html, .htaccess (if it's apache), plugins, themes, wp-admin directory, etc.). #. Login to cPanel #. Go to File Manager. ====How to set Expires Headers for Your Site on cPanel=..." current

20 August 2024

  • 13:5613:56, 20 August 2024 diff hist +14,422 N Boot ProcessCreated page with " ==== Linux Boot Process ==== ---- Understanding the boot process will help you understand how the hardware and software is working together, and also will give you the required information to begin troubleshooting a booting problem you have. ====Main Stages (short version)==== ---- (sysVinit) <b>BIOS</b> -- Basic Input/Output System; executes MBR. * System starts BIOS located on flash memory. <b>MBR</b> -- Master Boot Record; executes GRUB. * MBR contains the..." current
  • 13:5613:56, 20 August 2024 diff hist +6,000 N BitnamiCreated page with "List all of Bitnami's configuration files and scripts. ====Bitnami CTL script==== ---- Controls the stack (mysql, php-fpm, apache) $ sudo /opt/bitnami/ctlscript.sh start/restart/stop/status $ sudo /opt/bitnami/ctlscript.sh status apache already running mariadb already running php-fpm already running To restart individual services: $ sudo /opt/bitnami/ctlscript.sh restart php-fpm $ sudo /opt/bitnami/ctlscript.sh restart apache $ sudo /opt/bitnami/ctlscript.s..." current Tag: Visual edit: Switched
  • 13:3213:32, 20 August 2024 diff hist +1,037 N BastionsCreated page with " A <B>Bastion Host</B> is a special purpose computer on a network specifically designed and configured to withstand attacks. * The bastion generally hosts a single application, for example a proxy server, and all other services are removed or limited to reduce the threat to the computer. * It is hardened in a manner primarily due to its location and purpose, which is either on the outside of a firewall or in a DMZ (demilitarized zone(public subnet)) and usually involve..." current
  • 13:3113:31, 20 August 2024 diff hist +2,068 N Bash ScriptingCreated page with " My fave cheatsheet site: https://devhints.io/bash How to commit scripts to GitHub: [http://dikapedia.com/wiki/index.php/Git Git]</br> [https://github.com/ardikas/Shell-scripts Ardika's GitHub Repo] Add: netstat -plan | awk '/.*[0-9]+.[0-9]+.[0-9]+.[0-9].*/{gsub(/::ffff:/,"",$0);print $4"\t" $5}'|cut -sd. -f 1->netstat.log;echo "Netstat report";echo;echo "Number of Connections to each port:";cat netstat.log |awk {'print $1'}|cut -d: -f 2|sort|uniq -c|sort -nk 1|..." current
  • 13:3013:30, 20 August 2024 diff hist +1 MediaWiki:Tweeki-navbar-brandNo edit summary current
  • 13:2913:29, 20 August 2024 diff hist +5 MediaWiki:Tweeki-navbar-brandNo edit summary Tag: Manual revert
  • 05:4205:42, 20 August 2024 diff hist +6,718 N AzureCreated page with "====Migrating Ubuntu from Azure to AWS ==== ---- [+] Useful links: </br> https://ubuntu.com/aws</br> https://ubuntu.com/blog/ubuntu-on-aws-gets-serious-performance-boost-with-aws-tuned-kernel</br> https://packages.ubuntu.com/search?keywords=linux-aws</br> https://launchpad.net/ubuntu/+source/linux-aws</br> In order to run Ubuntu from Azure in AWS, the Azure kernel needs to be replaced with the 'generic' AWS turned Ubuntu kernel (<b>linux-aws</b>) either on the source o..." current
  • 05:4105:41, 20 August 2024 diff hist +839 N AWS CLICreated page with "====How to uninstall AWS CLI v1 (on AL2)==== ---- Uninstall aws cli v1: $ sudo yum remove awscli https://docs.aws.amazon.com/cli/v1/userguide/install-linux-al2017.html#install-amazon-linux-yum-uninstall ====How to install AWS CLI v2 (on AL2)==== ---- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install or another way: $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awsc..." current
  • 05:4105:41, 20 August 2024 diff hist +18,988 N AuditdCreated page with "====What is Audit Daemon (auditd)?==== ---- auditd is the userspace component to the Linux Auditing System. It's responsible for writing audit records to the disk. Viewing the logs is done with the ausearch or aureport utilities. Configuring the audit system or loading rules is done with the auditctl utility. During startup, the rules in /etc/audit/audit.rules are read by auditctl and loaded into the kernel. Alternately, there is also an augenrules program that reads ru..." current
  • 05:4105:41, 20 August 2024 diff hist +153 N AtopCreated page with "https://www.redhat.com/sysadmin/analyzing-linux-server-performance-atop Good article: https://haydenjames.io/use-atop-linux-server-performance-analysis/" current
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)