Okay I've been struggling with this all the week sorry if it's a repost but I couldn't find or understand any other "ask ubuntu" posts.
My goal it's to reach the ssh connections from one interface and from another interface reach the ports 80 and 443 from my server.
I have this config on my 01-netcfg.yaml
network: version: 2 renderer: networkd ethernets: ens160: addresses: [XXX.XXX.118.3/26] nameservers: addresses: [126.96.36.199, XXX.XXX.45.1, XXX.XXX.45.2] routes: - to: XXX.XXX.13.192/26 via: XXX.XXX.118.62 ens192: addresses: [XXX.XXX.118.67/26] gateway4: XXX.XXX.45.1 nameservers: addresses: [188.8.131.52, XXX.XXX.45.1, XXX.XXX.45.2] ens224: addresses: [XXX.XXX.118.131/26] nameservers: addresses: [184.108.40.206, XXX.XXX.45.1, XXX.XXX.45.2] routes: - to: 0.0.0.0/0 via: XXX.XXX.118.190 vlans: vlan411: id: 411 link: ens160 addresses: [XXX.XXX.13.192/26] vlan431: id: 431 link: ens192 addresses: [XXX.XXX.118.164/26] vlan740: id: 740 link: ens224 addresses: [XXX.XXX.118.131/26]
The problem is if remove the route for my admin server (ends .3); I can access via web to my other interface (ends with .131) but I can't reach the server via ssh (.3).
My route for the ip server ends with .3 and my route for public (infranet) ends with 131
So I can't figure out how to make it work... if I have to change something on the netplan config or is more a iptables change.
My current status for the ufw is inactive.
Thank you for the help in advance.
my route table
default XXX.XXX.118.190 0.0.0.0 UG 0 0 0 ens224 XXX.XXX.13.192 XXX.XXX.118.62 255.255.255.192 UG 0 0 0 ens160 XXX.XXX.13.192 0.0.0.0 255.255.255.192 U 0 0 0 vlan431 XXX.XXX.13.192 0.0.0.0 255.255.255.192 U 0 0 0 vlan740 XXX.XXX.118.0 0.0.0.0 255.255.255.192 U 0 0 0 ens160 XXX.XXX.118.64 0.0.0.0 255.255.255.192 U 0 0 0 ens192 XXX.XXX.118.128 0.0.0.0 255.255.255.192 U 0 0 0 ens224