Modify complianced_image/how_to_creating_and_making_an_AMI_public.mkd
@ -2,14 +2,31 @@
|
|||||||
|
|
||||||
## Creating an Amazon EBS-Backed Linux AMI
|
## 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:
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
[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
|
## How to making
|
||||||
|
|
||||||
### Pre-Install
|
### 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
|
### 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 sed -i "/^root/a\admin ALL=(ALL:ALL) ALL" /etc/sudoers
|
||||||
admin@ip:/opt/harbian-audit-master$ sudo reboot
|
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:
|
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)
|
[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 {} \;
|
||||||
# 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/tallylog
|
||||||
# echo > /var/log/lastlog
|
# echo > /var/log/lastlog
|
||||||
# echo > /var/log/wtmp
|
# echo > /var/log/wtmp
|
||||||
|
```
|
||||||
|
|
||||||
|
#### AIDE RE-INIT
|
||||||
|
|
||||||
|
|
||||||
|
#### Clear bash hostory
|
||||||
|
```
|
||||||
# echo > ~/.bash_history
|
# echo > ~/.bash_history
|
||||||
# history -cw
|
# history -cw
|
||||||
$ echo > ~/.bash_history
|
$ echo > ~/.bash_history
|
||||||
|
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-01.png
Normal file
After Width: | Height: | Size: 182 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-02.png
Normal file
After Width: | Height: | Size: 101 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-03.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-04.png
Normal file
After Width: | Height: | Size: 156 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-05.png
Normal file
After Width: | Height: | Size: 134 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-06.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-07.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-08.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-09.png
Normal file
After Width: | Height: | Size: 117 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-10.png
Normal file
After Width: | Height: | Size: 158 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-11.png
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-12.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-13.png
Normal file
After Width: | Height: | Size: 134 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-14.png
Normal file
After Width: | Height: | Size: 134 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-15.png
Normal file
After Width: | Height: | Size: 183 KiB |
BIN
docs/complianced_image/picture/Create-EBS-Backed-AMI-16.png
Normal file
After Width: | Height: | Size: 254 KiB |