2つのnicを持ったマシンで片方のみ bridge インターフェースにして、そのbridgeインターフェースにFreeIPAなどのvmを付けることになった
っでまずは bridge インターフェースを作ってみる

2026y03m07d_000855224.png

作り方はnmcliで行います。nmtuiでも構いませんけど。

 [eth0のipを外す]
nmcli connection modify eth0  ipv4.addresses "" ipv4.method disabled
 
 [bridge用のbr0を用意]
nmcli connection add type bridge ifname br0 con-name br0
 
 [br0にipを設定]
nmcli connection modify br0 ipv4.method manual
nmcli connection modify br0 ipv4.method manual  ipv4.addresses 192.168.0.100/24 ipv4.gateway "" 
 
 [eth0をbr0に加える]
nmcli connection add type bridge-slave ifname eth0 master br0
 
 [nicの再起動]
systemctl restart NetworkManager
あるいは
nmcli connection down eth0
nmcli connection up br0
nmcli connection up eth0

あとはfirewallによるmasqueradeを有効にすれば、内部のPCも外部にアクセス可能になります

 [eth1は external]
nmcli connection modify eth1 connection.zone external
 
 [br0はtrusted]
nmcli connection modify br0 connection.zone trusted
 
 [反映]
firewall-cmd --reload
 [確認]
firewall-cmd --get-active-zone

注意。eth0 は trusted に入れない。bridgeのみを入れる

最新の60件
2026-05-13 2026-05-12 2026-05-11 2026-05-08 2026-05-06 2026-05-05 2026-05-04 2026-05-03 2026-05-02 2026-04-30 2026-04-29 2026-04-28 2026-04-27 2026-04-25 2026-04-24 2026-04-22 2026-04-21 2026-04-12 2026-04-08 2026-04-06 2026-04-05 2026-04-02 2026-03-26 2026-03-23 2026-03-21 2026-03-19 2026-03-15 2026-03-14 2026-03-13 2026-03-07 2026-03-06 2026-03-04 2026-03-02 2026-02-26 2026-02-24 2026-02-21 2026-02-18 2026-02-17 2026-02-16 2026-02-11

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2026-03-07 (土) 00:39:22