Score:0

How to setup netplan routing for second (non-default) NIC to Lan gateway, while using iptables?

mp flag

Trying to setup netplan (networkd) gateway-routing, with no-dhcp, iptables forwarding+Nat, between the 2 NICs:

  • wan0 connected to Internet via its (default) gateway
  • lan0 connected to the Lan gateway/router (**)

The current yaml looks like:

Let NetworkManager manage all devices on this system


network: version: 2 renderer: networkd ethernets: wan0: match: macaddress: 00:1e:67:15:01:31 set-name: wan0 dhcp4: false addresses: [xx.yy.zz.170/24] routes: - to: default via: xx.yy.zz.169 nameservers: addresses: [aa.bbb.ccc.dd, ee.fff.ggg.hh, 8.8.8.8, 8.8.4.4] lan0: match: macaddress: 00:1e:67:15:01:30 set-name: lan0 dhcp4: false addresses: [10.10.10.1/24] nameservers: addresses: [xx.yy.zz.170]

The IP address for the Lan gateway is 10.10.10.10

Currently, the NICs are active, the server/bridge has Internet access, but the Lan workstations can't connect.

What would be the best way to fix this and enable the Lan gateway, any help is appreciated?

Thank you. Regards.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.