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-11-14 2026-11-13 2026-11-12 2026-11-02 2026-11-01 2026-10-30 2026-10-28 2026-10-26 2026-10-21 2026-10-20 2026-10-18 2026-10-12 2026-10-08 2026-10-07 2026-10-06 2026-10-04 2026-10-02 2026-10-01 2026-09-30 2026-09-28 2026-09-27 2026-09-26 2026-09-22 2026-09-17 2026-09-11 2026-09-06 2026-08-27 2026-08-24 2026-08-20 2026-08-19 2026-08-17 2026-08-16 2026-08-15 2026-08-13 2026-08-12 2026-08-11 2026-08-09 2026-07-30 2026-07-25 2026-07-24 2026-07-20 2026-07-18

edit


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