Slide 1

Slide 1 text

セキュリティグループとNACL 2018/9/20 Thu Masaru Ogura

Slide 2

Slide 2 text

• 小倉 大 (おぐら まさる) Facebook : https://www.facebook.com/masaru.ogura.71 Twitter : @MasaruOgura • 株式会社サーバーワークス • 札幌在住 • 以前はデータセンターネットワーク運用 • AWS歴 2年10か月 自己紹介

Slide 3

Slide 3 text

今日の内容 • セキュリティグループとNACL • クイズ

Slide 4

Slide 4 text

今日の内容 • セキュリティグループとNACL • クイズ

Slide 5

Slide 5 text

セキュリティグループとNACL 20180418 AWS Black Belt Online Seminar Amazon VPC https://www.slideshare.net/AmazonWebServicesJapan/20180418-aws-black-belt-online-seminar-amazon-vpc

Slide 6

Slide 6 text

セキュリティグループとNACL AWS ドキュメント » Amazon VPC » ユーザーガイド » セキュリティ https://docs.aws.amazon.com/ja_jp/vpc/latest/userguide/VPC_Security.html

Slide 7

Slide 7 text

セキュリティグループの上限 AWS サービス制限 https://docs.aws.amazon.com/ja_jp/general/latest/gr/aws_service_limits.html 日本語サイトだと50

Slide 8

Slide 8 text

セキュリティグループの上限 AWS Service Limits https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html 英語サイトだと60

Slide 9

Slide 9 text

セキュリティグループの上限 マネジメントコンソールでは60 実際に60ルール設定できる

Slide 10

Slide 10 text

セキュリティグループの上限 セキュリティグループの上限緩和は可能だが、 以下の条件がある (SGルール数) × (ENIあたりのSG) ≦ 300 SG : セキュリティグループ ENI : ネットワークインターフェイス 例) (SGルール数)100 × (ENIあたりのSG) 3 = 300 ≦ 300

Slide 11

Slide 11 text

セキュリティグループの動き セキュリティグループのルールの削除は接続中の 通信は即時ブロックできない。 例えば、pingを対象サーバに実行し続けていると きにセキュリティグループの対象ルールを削除し てもpingは通り続ける。

Slide 12

Slide 12 text

セキュリティグループの動き おそらくステートフルの処理のため。 (明確に記載されているサイト見つけられず) ステートフルで処理するときはセッションテーブ ルを保持して、戻りの通信をチェックするので、 セッションテーブルがクリアされる前に通信がく ると通過してしまうのではと考えています。

Slide 13

Slide 13 text

今日の内容 • セキュリティグループとNACL • クイズ

Slide 14

Slide 14 text

クイズ Rule # Type Protocol Port Range Source Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source ALL Traffic ALL ALL 0.0.0.0/0 Type Protocol Port Range Destination ALL Traffic ALL ALL 0.0.0.0/0 NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 15

Slide 15 text

クイズ1 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source ALL Traffic ALL ALL 0.0.0.0/0 Type Protocol Port Range Destination ALL Traffic ALL ALL 0.0.0.0/0 NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 16

Slide 16 text

クイズ1 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source ALL Traffic ALL ALL 0.0.0.0/0 Type Protocol Port Range Destination ALL Traffic ALL ALL 0.0.0.0/0 NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 17

Slide 17 text

クイズ2 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination ALL Traffic ALL ALL 0.0.0.0/0 NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 18

Slide 18 text

クイズ2 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination ALL Traffic ALL ALL 0.0.0.0/0 NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 19

Slide 19 text

クイズ3 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 20

Slide 20 text

クイズ3 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 21

Slide 21 text

クイズ4 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 22

Slide 22 text

クイズ4 Rule # Type Protocol Port Range Source Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny 100 HTTP(80) TCP(6) 80 0.0.0.0/0 ALLOW * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG1 Outbound Rules

Slide 23

Slide 23 text

クイズ5 Rule # Type Protocol Port Range Source Allow/De ny * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination ALL Traffic ALL ALL 0.0.0.0/0 NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG2 Outbound Rules

Slide 24

Slide 24 text

クイズ5 Rule # Type Protocol Port Range Source Allow/De ny * ALL Traffic ALL ALL 0.0.0.0/0 DENY Rule # Type Protocol Port Range Destinati on Allow/De ny * ALL Traffic ALL ALL 0.0.0.0/0 DENY Type Protocol Port Range Source HTTP(80) TCP(6) 80 0.0.0.0/0 Type Protocol Port Range Destination ALL Traffic ALL ALL 0.0.0.0/0 NACL Inbound Rules NACL Outbound Rules SG1 Inbound Rules SG2 Outbound Rules

Slide 25

Slide 25 text

ご清聴ありがとうございました。

Slide 26

Slide 26 text

参考資料 • 20180418 AWS Black Belt Online Seminar Amazon VPC https://www.slideshare.net/AmazonWebServicesJapan/20 180418-aws-black-belt-online-seminar-amazon-vpc • AWS サービス制限 https://docs.aws.amazon.com/ja_jp/general/latest/gr/aw s_service_limits.html • AWS Service Limits https://docs.aws.amazon.com/general/latest/gr/aws_serv ice_limits.html

Slide 27

Slide 27 text

参考資料 • AWS ドキュメント » Amazon VPC » ユーザーガイド » セキュ リティ https://docs.aws.amazon.com/ja_jp/vpc/latest/userguide /VPC_Security.html