![VyOS:nat 來源規則 [eth0] 無效,設定失敗](https://rvso.com/image/792191/VyOS%EF%BC%9Anat%20%E4%BE%86%E6%BA%90%E8%A6%8F%E5%89%87%20%5Beth0%5D%20%E7%84%A1%E6%95%88%EF%BC%8C%E8%A8%AD%E5%AE%9A%E5%A4%B1%E6%95%97.png)
我一直在「nat 來源規則 [eth0] 無效 設定失敗「我的vyos cli 上出現錯誤。我也在這篇文章中包含了我的實驗室網路圖。我想將vyos 作為路由器,並進行NAT。此設定在Proxmox 伺服器中完成,我想在上面有一個網路伺服器dmz 和 LAN 上的其他設備能夠連接到 WAN。
我為初始 vyos 設定所做的步驟:
---------- for eth0 (WAN) -------------
set interfaces ethernet eth0 address dhcp
set interfaces ethernet eth0 description 'WAN-INTERFACE'
---------- for eth1 (LAN) -------------
set interfaces ethernet eth1 address '192.168.1.1/24'
set interfaces ethernet eth1 description 'LAN-INTERFACE'
**for the nat- in the same console**
set nat source rule 100 source address '192.168.1.0/24'
set nat source rule 100 outbound-interface 'eth0'
set nat source rule 100 translation address masquerade
---------- for eth2 (DMZ) -------------
set interfaces ethernet eth2 address '192.168.2.1/29'
set interfaces ethernet eth2 description 'DMZ'
set nat source rule 200 source address '192.168.2.0/24'
set nat source rule 200 outbound-interface 'eth0'
set nat source rule 200 translation address masquerade
問題: 但在為 eth1 或 eth2 設定出站介面規則「eth0」時,我遇到了上面提到的錯誤。透過檢查“show nat”,我沒有看到規則中實作了出站介面。
我嘗試的步驟:我所知道和所做的唯一一件事就是確保乙太網路介面名稱不是 eth0 以外的其他名稱,實際上它是“eth0”
我該如何解決這個問題?先感謝您!