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-08-09 2026-08-08 2026-08-02 2026-07-30 2026-07-25 2026-07-24 2026-07-20 2026-07-18 2026-07-17 2026-07-16 2026-07-08 2026-07-07 2026-07-06 2026-07-04 2026-07-02 2026-06-27 2026-06-25 2026-06-24 2026-06-21 2026-06-17 2026-06-14 2026-06-13 2026-06-09 2026-06-08 2026-06-06 2026-06-05 2026-06-04 2026-06-03 2026-05-31 2026-05-26 2026-05-23 2026-05-22 2026-05-21 2026-05-20 2026-05-19 2026-05-18 2026-05-12 2026-05-11

edit


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