Skip to Content
Linux クックブック、第 2 版
book

Linux クックブック、第 2 版

by Carla Schroder
May 2025
Intermediate to advanced
544 pages
7h 23m
Japanese
O'Reilly Media, Inc.
Content preview from Linux クックブック、第 2 版

第14章. firewalldを使ってLinuxファイアウォールを構築する

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

この章では、ホストファイアウォールを構築するためにfirewalldを使用する基本について述べる。 個々のホストは異なる要求を持っている。例えば、サーバは様々なタイプの着信接続要求を許可しなければならないし、何のサービスも実行していないPCはどんな接続要求も受け入れる必要はない。複数のネットワークにアクセスするノートPCは、動的なファイアウォール管理が必要である。

firewalldの概要

firewalldは、すべてのファイアウォールと同様に、非常に長い機能のリストを持っている。ここでは主に、firewalldのゾーンを使用して、システムに入るトラフィックを制御する方法を学ぶ。ゾーンは信頼のレベルを表すコンテナである。例えば、あるゾーンはあらゆる種類の着信接続要求を許可し、あるゾーンは非常に制限的である。 システムの各ネットワークインタフェースには1つのゾーンしか代入できないし、1つのゾーンを複数のインタフェースに代入することもできる。

要ネットワーク知識

理解すべき最も重要なネットワークの概念は、ポート、サービス、TCP、UDP、ポートフォワーディング、マスカレード、ルーティング、IPアドレッシングである。これらを理解すれば、ファイアウォールの設定方法も理解できるだろう。 コンピューターネットワーキングに関する指導が必要な場合は、Gordon Davies著『Networking Fundamentals』(Packt Publishing)やDoug Lowe著『Networking All-in-One For Dummies, 7th Edition』(For Dummies)を試してみよう。O'Reilly Learning Platformを購読していれば、素晴らしい情報が豊富に発見できるだろう。

従来のLinuxファイアウォールは、 、送受信ネットワークトラフィックをフィルタリングするLinuxカーネル内のnetfilterパケットフィルタリングフレームワークと、、トラフィックをフィルタリングする規則のテーブルを作成・管理するために使用されるソフトウェアであるiptablesで作成されている。

時代は変わり、、iptables はufw(Uncomplicated Firewall)、nftables(Netfilter tables)、firewalld(firewall daemon) といった新しいルールマネージャーに取って代わられつつある。firewalld は iptables や nftables と同様、トラフィックのフィルタリングを管理するためにルールのテーブルを使用する。 firewalldは、iptablesとnftablesの両方のフロントエンドであ る。nftablesはiptablesを大幅に改善したもので、firewalldのデフォ ルト向けのバックエンドになることを意図しているが、Linuxディストリビュー ションによっては、iptablesがまだデフォルトになっている。etc/firewalld/firewalld.confの FirewallBackendオプションで好みのバックエンドを設定する(レシピ14.4)。

firewalldには、 、ゾーンと呼ばれる、あらかじめ定義された規則セットが付属している。ゾーンとは、サービスを実行していないマシン、サービスを実行しているマシン、同じマシン上の異なるネットワークインタフェース用のゾーンなど、さまざまな使用ケースに対応するためのものである。これらのゾーンは、自分の要求に合わせて編集できる。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Jake VanderPlas, 菊池 彰
Bash クックブック第2版

Bash クックブック第2版

Carl Albing, JP Vossen
行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

Stephen Wendel, 武山 政直, 相島 雅樹, 反中 望, 松村 草也

Publisher Resources

ISBN: 9798341650091