Skip to content

Instantly share code, notes, and snippets.

@overnew
overnew / s3_Resource.json
Last active March 21, 2024 05:39
s3_Resource.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowS3ReadAccess", #s3의 읽기 권한 부여
"Effect": "Allow",
#Principal은 리소스 기반에서만 사용, 특정 계정의 특정 role만 허용 시킴
"Principal": {
"AWS": "arn:aws:iam::<account ID>:role/<대상 role 이름>"
},
@overnew
overnew / ec2_s3_role.json
Last active March 21, 2024 02:37
ec2 s3 role
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:CreateBucket",
"s3:PutBucketOwnershipControls",
"s3:PutObject",
"s3:PutBucketPublicAccessBlock",
"s3:ListBucket",
@overnew
overnew / Vagrantfile
Created February 26, 2024 12:24
1VM-3container
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.box_version = "20240223.0.0"
config.vm.network "private_network", ip: "192.168.33.20" #새로운 lan 카드 생성
config.vm.synced_folder ".", "/dockerfiles" #현재 폴더를 vm의 /dockerfiles와 연동해서 사용
config.vm.provision "shell", inline: "curl -fsSL https://get.docker.com -o get-docker.sh"
config.vm.provision "shell", inline: "sh get-docker.sh"
config.vm.provision "shell", inline: "usermod -aG docker vagrant" #vagrant라는 유저 만들어서 추가
config.vm.provision "shell", inline: "echo 'sudo su -' >> .bashrc"
@overnew
overnew / Vagrantfile
Created February 26, 2024 12:03
1vm_apache+nginx
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.box_version = "20240223.0.0"
config.vm.network "private_network", ip: "192.168.33.10" #새로운 lan 카드 생성됨.
config.vm.hostname = "mz-web-server"
config.vm.provision "shell", inline: <<-SHELL
# Create a new user mzuser with password mzuser
useradd -m -s /bin/bash -p $(echo 'mzuser' | openssl passwd -1 -stdin) mzuser
@overnew
overnew / example-mysql-apache.php
Created February 23, 2024 08:14
example-mysql-apache.php
<?php
$db = new mysqli('db', 'root', 'wordpress', 'team1');
if($db->connect_error){
die('Not Connected : ' . $db->connect_error);
}
//team list 출력
{
echo '<p>' . "team1" . '</p>';
echo "-------------------------------------------------------";
@overnew
overnew / HQ.conf
Created February 5, 2024 14:07
HQ.conf
conf t
int lo0
ip add 10.1.1.1 255.255.255.0
no shut
exit
int s1/0
ip add 10.1.10.1 255.255.255.252
@overnew
overnew / HQ_vpn2.conf
Created February 5, 2024 14:07
HQ_vpn2.conf
conf t
int s1/0
ip add 10.1.10.6 255.255.255.252
no shut
exit
int f0/1
ip add 1.1.123.2 255.255.255.248
@overnew
overnew / HQ_vpn1.conf
Created February 5, 2024 14:06
HQ_vpn1.conf
conf t
int s1/0
ip add 10.1.10.2 255.255.255.252
no shut
exit
int f0/1
ip add 1.1.123.1 255.255.255.248
@overnew
overnew / isp.conf
Created February 5, 2024 14:06
isp.conf
conf t
int f0/0
ip add 1.1.100.2 255.255.255.252
no shut
exit
int s1/0
ip add 1.1.100.5 255.255.255.252
no shut
exit
@overnew
overnew / ce.conf
Created February 5, 2024 14:05
ce.conf
conf t
int f0/0
ip add 1.1.123.3 255.255.255.248
no shut
exit
int f0/1
ip add 1.1.100.1 255.255.255.252