I am brand new to Linux. I only started 'playing' yesterday, so please forgive my lack of knowledge.
I have built a linux server with 2 network cards. Outside interface (ens192) for all Internet traffic and an INSIDE interface (ens160) for all internal traffic. All interfaces are STATIC.
I would like a single default route to be on the OUTSIDE (ens192)
I would like to route all other networks INSIDE (ens160)
Please see below what I have attempted to build so far.
network:
version: 2
renderer: networkd
ethernets:
ens160:
dhcp4: no
dhcp6: no
addresses: [172.24.0.50/23]
gateway4: 172.24.0.5
routes:
- to: 10.0.0.0/8
via: 172.24.0.5
- to: 172.23.0.0/19
via: 172.24.0.5
- to: 172.17.10.0/24
via: 172.24.0.5
I am currently receiving this error - /etc/netplan/50-cloud-init.yaml:15:1: Invalid YAML: tabs are not allowed for indent:
- to: 172.17.10.0/24
I have received this error with a previous configuration.
** (generate:5240): WARNING **: 10:16:53.463: Problem encountered while validating default route consistency.Please set up multiple routing tables and use routing-policy
instead.
Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in ens192 but also in ens160
I am at a complete loss on what to do here.
Please help.