/etc/neutron/neutron.conf
ファイルにおいて FWaaS プラグインを有効化します。
service_plugins = firewall_v2
[service_providers]
...
service_provider = FIREWALL:Iptables:neutron.agent.linux.iptables_
firewall.OVSHybridIptablesFirewallDriver:default
[fwaas]
driver = neutron_fwaas.services.firewall.drivers.linux.iptables_
fwaas_v2.IptablesFwaasDriver
enabled = True
注釈
On Ubuntu, modify the [fwaas]
section in the
/etc/neutron/fwaas_driver.ini
file instead of
/etc/neutron/neutron.conf
.
Configure the FWaaS plugin for the L3 agent.
In the AGENT
section of l3_agent.ini
, make sure the FWaaS extension
is loaded:
[AGENT]
extensions = fwaas
Edit the FWaaS section in the /etc/neutron/neutron.conf
file to indicate
the agent version and driver:
[fwaas]
agent_version = v2
driver = iptables
enabled = True
必要なテーブルをデータベースに作成します。
# neutron-db-manage --subproject neutron-fwaas upgrade head
通常コントローラノードに配置されている`` local_settings.py``ファイル中のオプションを有効にします。
OPENSTACK_NEUTRON_NETWORK = {
...
'enable_firewall' = True,
...
}
注釈
By default, enable_firewall
option value is True
in
local_settings.py
file.
ウェブサーバーを再起動して、設定を適用します。
設定を適用するために``neutron-l3-agent`` と``neutron-server``を再起動します。
Create the firewall rules and create a policy that contains them. Then, create a firewall that applies the policy.
ファイアウォールのルールを作成します。
$ neutron firewall-rule-create --protocol {tcp,udp,icmp,any} \
--source-ip-address SOURCE_IP_ADDRESS \
--destination-ip-address DESTINATION_IP_ADDRESS \
--source-port SOURCE_PORT_RANGE --destination-port DEST_PORT_RANGE \
--action {allow,deny,reject}
The Networking client requires a protocol value. If the rule is protocol
agnostic, you can use the any
value.
注釈
When the source or destination IP address are not of the same IP version (for example, IPv6), the command returns an error.
ファイアウォールのポリシーを作成します。
$ neutron firewall-policy-create --firewall-rules \
"FIREWALL_RULE_IDS_OR_NAMES" myfirewallpolicy
Separate firewall rule IDs or names with spaces. The order in which you specify the rules is important.
次のように、任意のルールなしで、ファイアウォールポリシーを作成し、後でルールを追加することができます。
複数のルールを追加するには、更新操作を使ってください。
単一のルールを追加するには、インサート・ルール操作を使ってください。
詳細は OpenStack Command-Line Interface Reference の Networking command-line client を参照してください。
注釈
FWaaS always adds a default deny all
rule at the lowest precedence
of each policy. Consequently, a firewall policy with no rules blocks
all traffic by default.
Create a firewall:
$ neutron firewall-create FIREWALL_POLICY_UUID
注釈
The firewall remains in PENDING_CREATE state until you create a Networking router and attach an interface to it.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.