はじめに
- AWS VPCの勉強がてら、管理用サブネット~公開サブネット間のSSH接続の試験をしたメモです。
Internal SSH
アップロードしたファイルのパーミッションを変更する
sudo chmod 600 xxx.pem
踏台サーバにコンフィグファイルを作る
touch ~/.ssh/config
vi .ssh/config
.ssh/config
Host wss
HostName 172.10.0.xxx #IPアドレス
User ubuntu
IdentityFile ~/xxx.pem
Port 22
ターゲットにssh接続する
ssh wss
yes/noを聞かれるので応答する
yes
接続完了
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-1057-aws x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed Apr 15 09:47:18 UTC 2020
System load: 0.12 Processes: 92
Usage of /: 18.8% of 7.69GB Users logged in: 0
Memory usage: 18% IP address for eth0: 172.10.0.xxx
Swap usage: 0%
0 packages can be updated.
0 updates are security updates.
*** System restart required ***
Last login: Wed Apr 15 09:41:44 2020 from 172.10.200.xxx
ubuntu@ip-172-10-0-xxx:~$
ネットワークACL
ManagementNetworkACL
ExternalNetworkACL
セキュリティグループ
ManagedServer
Inbound
Outbound
WebServiceServer
Inbound
Outbound
おわりに
- ネットワークACLは、ステートレス
- セキュリティグループは、ステートフル
- WebServiceServerのセキュリティグループは、開発専用 - ポート:8000 → 80、ソース:0.0.0.0/0