Modify complianced_image/how_to_creating_and_making_an_AMI_public.mkd

This commit is contained in:
samson 2018-12-17 02:34:49 +08:00
parent 57ee4b9e7d
commit b779c132ff
17 changed files with 34 additions and 3 deletions

View File

@ -2,14 +2,31 @@
## Creating an Amazon EBS-Backed Linux AMI
[https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html)
The creation process is as follows:
![1](./picture/Create-EBS-Backed-AMI-01.png)
![2](./picture/Create-EBS-Backed-AMI-02.png)
![3](./picture/Create-EBS-Backed-AMI-03.png)
![4](./picture/Create-EBS-Backed-AMI-04.png)
![5](./picture/Create-EBS-Backed-AMI-05.png)
![6](./picture/Create-EBS-Backed-AMI-06.png)
![7](./picture/Create-EBS-Backed-AMI-07.png)
![8](./picture/Create-EBS-Backed-AMI-08.png)
![9](./picture/Create-EBS-Backed-AMI-09.png)
![10](./picture/Create-EBS-Backed-AMI-10.png)
![11](./picture/Create-EBS-Backed-AMI-11.png)
![12](./picture/Create-EBS-Backed-AMI-12.png)
![13](./picture/Create-EBS-Backed-AMI-13.png)
![14](./picture/Create-EBS-Backed-AMI-14.png)
![15](./picture/Create-EBS-Backed-AMI-15.png)
![16](./picture/Create-EBS-Backed-AMI-16.png)
[https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html)
## How to making
### Pre-Install
```
$ sudo apt update && sudo apt install -y bc net-tools vim
$ sudo apt update && sudo apt install -y bc net-tools vim unzip
```
### Get harbian-audit project
@ -38,6 +55,13 @@ admin@ip:/opt/harbian-audit-master$ sudo ./bin/hardening.sh --apply
admin@ip:/opt/harbian-audit-master$ sudo sed -i "/^root/a\admin ALL=(ALL:ALL) ALL" /etc/sudoers
admin@ip:/opt/harbian-audit-master$ sudo reboot
```
After reboot:
```
admin@ip:/opt/harbian-audit-master$ sudo bash ./docs/examples/configurations/etc.iptables.rules.v4.sh
admin@ip:/opt/harbian-audit-master$ sudo -s
admin@ip:/opt/harbian-audit-master# iptables-save > /etc/iptables/rules.v4
admin@ip:/opt/harbian-audit-master# ip6tables-save > /etc/iptables/rules.v6
```
Related how to use harbian-audit to adit and apply, please reference:
[https://github.com/hardenedlinux/harbian-audit/blob/master/README.md](https://github.com/hardenedlinux/harbian-audit/blob/master/README.md)
@ -56,7 +80,7 @@ $ sudo rm /opt/master.zip
```
#### Share an AMI for public, use the following command to clear the current log:
#### Clear the current log:
```
# find /var/log/ -name "*.log" -exec shred -u {} \;
# find /var/log/ -name "*.log.*" -exec shred -u {} \;
@ -72,6 +96,13 @@ $ sudo rm /opt/master.zip
# echo > /var/log/tallylog
# echo > /var/log/lastlog
# echo > /var/log/wtmp
```
#### AIDE RE-INIT
#### Clear bash hostory
```
# echo > ~/.bash_history
# history -cw
$ echo > ~/.bash_history

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB