Tuesday, June 22, 2021

Check if a Package is installed on Linux or not

https://www.cyberciti.biz/faq/apt-get-list-packages-are-installed-on-ubuntu-linux/

https://www.2daygeek.com/find-out-if-package-is-installed-or-not-in-linux-unix/


#RHEL 6, RHEL7

yum list installed openssh


#RHEL 8

dnf list installed httpd


#Ubuntu

apt list -a pkgNameHere

apt list --installed

apt -qq list nano

Amazon Image : Default User

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connection-prereqs.html

  • Get the default user name for the AMI that you used to launch your instance:

    • For Amazon Linux 2 or the Amazon Linux AMI, the user name is ec2-user.

    • For a CentOS AMI, the user name is centos.

    • For a Debian AMI, the user name is admin.

    • For a Fedora AMI, the user name is ec2-user or fedora.

    • For a RHEL AMI, the user name is ec2-user or root.

    • For a SUSE AMI, the user name is ec2-user or root.

    • For an Ubuntu AMI, the user name is ubuntu.

    • Otherwise, if ec2-user and root don't work, check with the AMI provider.

How to make File Immutable in Linux : Even Root cannot delete : CHATTR : LSATTR

[root@ip-10-79-197-70 ec2-user]# sudo chattr +i -V backup/iptables.backup

chattr 1.42.9 (28-Dec-2013)

Flags of backup/iptables.backup set as ----i-----------

[root@ip-10-79-197-70 ec2-user]# sudo lsattr backup

----i----------- backup/iptables.backup

[root@ip-10-79-197-70 ec2-user]# rm -rf backup

rm: cannot remove ‘backup/iptables.backup’: Permission denied

[root@ip-10-79-197-70 ec2-user]# sudo rm -rf backup

rm: cannot remove ‘backup/iptables.backup’: Permission denied

[root@ip-10-79-197-70 ec2-user]# exit

exit

Redhat : IPTABLES : How to persist iptables as its changes are not saved by default

https://www.geeksforgeeks.org/iptables-restore-command-in-linux-with-examples/

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/security_guide/s2-firewall-ipt-act-sav

7.2.2. SAVING AND RESTORING IPTABLES RULES

Firewall rules are only valid for the time the computer is on; so, if the system is rebooted, the rules are automatically flushed and reset. To save the rules so that they are loaded later, use the following command:
/sbin/service iptables save
The rules are stored in the file /etc/sysconfig/iptables and are applied whenever the service is started or restarted, including when the machine is rebooted.

AWS : EFS

https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html#creating-using-fs-part1-console


https://docs.aws.amazon.com/efs/latest/ug/mounting-fs.html

The EFS mount helper is part of the amazon-efs-utils package. The amazon-efs-utils package is an open-source collection of Amazon EFS tools. For more information, see Manually installing the Amazon EFS client.


Before the Amazon EFS mount helper was available, we recommended mounting your Amazon EFS file systems using the standard Linux NFS client. For more information, see Mounting file systems without the EFS mount helper.



https://aws.amazon.com/efs/pricing/

TODO 22 June 2021

  •  VEA Vault ??
  • EFS Mount ??      ************************
  • QA  -> Approval  --- JIRA 
  • SSL EWS Hema -   Nihar ***************************
  • Devops Handover CVS --- Atul, Hemang 
  • Amit Yadav - API ???
  • Release Pipeline  CAH Mohsin
  • Mongodb  Service
  • Python SDK
  • Java Lambda
  • How to login to Azure VM ????? 
  • Ubuntu Script  ----> sudo ufw disable
  • Instance EFS Linking  ??? Mount

UFW : Script EC2

https://stackoverflow.com/questions/52544733/how-can-i-connect-to-ec2-if-i-close-port-22-using-ufw


Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass