Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
1時間でざっくり教えるサーバ運営超入門
Search
Infiniteloop
July 12, 2023
Programming
83
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
1時間でざっくり教えるサーバ運営超入門
株式会社インフィニットループの社内勉強会で使った資料「1時間でざっくり教えるサーバ運営超入門」。
対象は自宅サーバを外部に公開したいけど、よくわからなくて怖いという人。
Infiniteloop
July 12, 2023
More Decks by Infiniteloop
See All by Infiniteloop
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2025年版)
infiniteloop_inc
18
91k
俺の PHP プロファイラの話 PHP スクリプトで PHP 処理系のメモリをのぞき込む
infiniteloop_inc
1
770
心理的安全性を学び直し、 「いい組織とは何か?」を考えてみる
infiniteloop_inc
1
1.2k
ゼロからつくる 2D物理シミュレーション ~物理現象をコードに落とし込む方法~
infiniteloop_inc
1
1.7k
詫び石の裏側
infiniteloop_inc
0
1k
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2024年版)
infiniteloop_inc
7
36k
リファクタリングで実装が○○分短縮した話
infiniteloop_inc
0
320
ADRという考えを取り入れてみて
infiniteloop_inc
0
330
500万行のPHPプロジェクトにおけるログ出力の歩み
infiniteloop_inc
0
240
Other Decks in Programming
See All in Programming
Java 27新機能 / Java 27 new features
kishida
2
210
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
140
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
sbt 2.0: takeoff
eed3si9n
0
110
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
520
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
120
golang-bob.pdf
iwatsukayura
0
110
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.1k
setup-vp GitLab対応の裏側
naokihaba
0
160
Are APIs Still Relevant in the AI Era?
soyuka
0
440
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Side Projects
sachag
456
43k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
A designer walks into a library…
pauljervisheath
211
25k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
440
Why Our Code Smells
bkeepers
PRO
340
58k
How GitHub (no longer) Works
holman
316
150k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
320
Believing is Seeing
oripsolob
1
240
Designing for Timeless Needs
cassininazir
1
520
Rails Girls Zürich Keynote
gr2m
96
14k
Transcript
1࣌ؒͰͬ͘͟Γڭ͑Δ αʔόӡӦೖ גࣜձࣾΠϯϑΟχοτϧʔϓ ࣾษڧձࢿྉ দҪ݈ଠ
ର • LinuxͷΠϯετʔϧͨ͜͠ͱ͕͋Δ • LinuxΛར༻ͨ͜͠ͱ͕͋Γɺجຊతͳ ͍ํΘ͔͍ͬͯΔ • ࣗαʔόΛ֎෦ʹެ։͍͚ͨ͠ͲɺΑ͘ Θ͔Βͳͯ͘ා͍ͱ͍͏ਓ •
ࣾͰҰ൪ΘΕ͍ͯΔCentOSΛલఏ
ࠓ͍͑ͨ͜ͱ • αʔόΛެ։͢Δ্Ͱͷجૅࣝ • Πϯετʔϧޙ͔ΒɺαʔόΛ֎෦ެ ։͢Δ·Ͱʹ͖͢͜ͱ • ӡӦޙͷϝϯςφϯεͷํੑ
αʔόͱ͓Ͱ͋Δ(1) • ͓Λམͱ͞ΕͨΓɺͷͬͱΒΕͨΒෛ͚ • นͷ෦ʹ͋Δ͓ๅΛ࣋ͪग़͞ΕͨΒෛ͚ • ͓ๅΛकΔʹɺนງͳͲͷʑͷֻ ͚͕ඞཁ
αʔόͱ͓Ͱ͋Δ(2) • ͓ͷೖΓޱۛຯͯ͠࠷ݶʹ ʢརศੑ㲗҆શੑ ͜ΕΒ૬͢Δʣ • ଟߏͰकΔͷ͕جຊ ʢ֎ʹೖΒΕͨ߹Λఆͯ͠࡞Δʣ • ෳͷख๏ΛΈ߹ΘͤͯकΔ
ʢྫɿนʴງʣ
ϝʔϧαʔόʹྫ͑Δͱ • rootݖݶʢఱकֳʣΛୣΘΕͨΒશഊ ͏Ͳ͏͠Α͏ͳ͍࠷ѱͷࣄଶ શͯͷϝʔϧ͕ಡ·Εͯ͠·͏ • ҰൠϢʔβݖݶΛୣΘΕͨΒʢ֎นਐೖʣ ͜Εഊ͕ͩɺϝʔϧಡΊͳ͍ɺ·ͨҰ ෦ͷϢʔβͷΈͷϝʔϧ͕ಡ·Εͯ͠·͏ •
֎น͕མͪΔͱఱकֳ͕མͪΔ·Ͱૣ͍
ਐೖͷύλʔϯͷେผ • ਖ਼نͷํ๏Ͱೖͬͯ͘Δ →ύεϫʔυΞλοΫɹͳͲ • ηΩϡϦςΟϗʔϧΛಥ͔Εͨ →͍ͬͯΔιϑτͷόʔδϣϯ͕ݹ͍ɹͳͲ
Ͳ͏ରԠ͢Ε͍͍ͷʁ • Կແ͘ͱ # yum update • ෆཁͳαʔϏεࢭΊΔ • IPΞυϨε੍ݶΛՄೳͳݶΓݫ͘͠
(རศੑ㲗ηΩϡϦςΟ) ͜ΕΒ͕جຊ
ύεϫʔυΞλοΫͷରॲ • ͦͦඞཁͷແ͍αʔϏε͋͛ͳ͍ • IPΞυϨε੍ݶΛݫ͘͠ʢύεϫʔυ͢Βଧͯͳ͍ʣ • ϙʔτ൪߸ΛσϑΥϧτ͔Βมߋ͢Δ • ೝূํࣜΛݫ͘͠ʢ伴ೝূͳͲʣ •
ύεϫʔυΛෳࡶʹ ʢͨΓલɺ͜ΕʹཔΒͳ͍Α͏ʹʣ
ηΩϡϦςΟϗʔϧͷରॲ • ඞཁͷແ͍αʔϏε͋͛ͳ͍ • iptablesͰIPΞυϨε੍ݶΛݫ͘͠ઃఆɺ֎෦͔Β Listen͢Βͯ͠ͳ͍Α͏ʹݟ͑Δ • άϩʔόϧIPDMZͰެ։͢ΔͷͰͳ͘ɺNATͳͲ Ͱಛఆͷϙʔτ͚ͩެ։Ͱ͖ΔΑ͏ͳΒͦ͏͢Δ •
# yum updateͰৗʹ࠷৽ʹʢࣗಈΞοϓσʔτָ͕ʣ • ݟΒ͵ύοέʔδɺιʔε͔ΒͷΠϯετʔϧ ɺ͔ͦ͜ΒࣗͰηΩϡϦςΟϗʔϧͷࢹ͕ඞཁ
ଟߏͰकΔ • ϓϩηε͕ͬऔΒΕͨέʔεΛఆͯ͠ߏங͠Α͏ • rootΘͣɺՄೳͳݶΓઐ༻ϢʔβͰαʔϏεΛಈ ͔͢ʢ͠ສ͕ҰηΩϡϦςΟϗʔϧ͕͋ͬͯɺͦ ͷϢʔβ͚ͩͰࡁΉʣ • chrootڥ͕͑Δ߹ՄೳͳݶΓ͏ •
ύʔϛογϣϯՄೳͳݶΓ࠷ݶͷܗͰઃఆ
ӡ༻։࢝ޙ • # yum update ࣮֬ʹ • ͍͍ͭͭརศੑͷͨΊɺηΩϡϦςΟΛ؇͘มߋͯ͠ ͍͖͕͕ͪͩɺϙϦγʔΛ͔ͬ͠Γ࣋ͬͯӡ༻ •
ϩάͳΔ͘͜·ΊʹݟΑ͏ • MRTGɺmuninɺcactiͳͲΛ׆༻͠Α͏ • TripwireͳͲΛ͏ͱ͞Βʹ҆৺Ͱ͖Δ
࠷ޙʹ • ͕࣌ؒݶΒΕ͍ͯΔ͜ͱ͋ͬͯɺࠓ͑ͨͷ࠷ ݶͷใ • αʔόӡӦͷಓԞ͕ਂ͍ • ৗʹใΛνΣοΫ͠ɺվળ͍ͯ͘͜͠ͱ͕ॏཁ • ࣗ৴͕ͳ͔ͬͨΓɺෆ҆ཁૉ͕͋Δ߹ɺΠϯϑϥ
νʔϜॾઌഐํʹฉ͍ͨΓɺݟ͓ͯ͏
ͬ͘͟Γ·ͱΊ • Կͱ͋Ε # yum update • ෆཁͳαʔϏεࢭΊɺ ۃྗϙʔτ։͚ͳ͍ •
iptablesʹΑΔIPΞυϨε੍ݶ͕ରԠͷجຊɺ ࣗ৴͕ͳ͍ͳΒNATͰެ։ • গ͠Ͱෆ͕҆͋Ε૬ஊΛ
ࢀߟURL • ͘͞ΒΠϯλʔωοτۀه CentOSΛαʔόʔͱͯ͠׆༻͢ΔͨΊͷجຊతͳઃఆ http://tanaka.sakura.ad.jp/archives/001065.html • @IT ࿈ࡌهࣄ ʮश͏ΑΓ׳ΕΖʂ iptablesςϯϓϨʔτूʯ
http://www.atmarkit.co.jp/flinux/index/indexfiles/iptablesindex.html • nabeͷࡶهா ͜Ε͙Β͍ͬͱ͚ɹʙLinuxαʔόͷηΩϡϦςΟઃఆʙ http://nabe.blog.abk.nu/0485#tm1303756959