I got a network configuration problem. I got one machine that have two network cards (wired Ethernet)
NIC 1 - DHCP 8x.x.x.x Internet access only (through a external firewall)
NIC 2 - Static IP 172.16.100.133 Local network but Internet access is possible, but this machine should not used it for that
NIC 1 gets into the "Public network" category
NIC 2 gets into the "Private network" category
The problem is that I do not want internet traffic to go out on NIC2, Only 172.16.*
But sometimes the routing get messed up. and 172.16.100.1 will be the first default gateway (Maybe because the order the network are starting up)
So I add a persistent route entry 172.16.100.0/255.255.255.0 and than I need to remove the default gateway for net NIC2.
But when I do that the NIC2 jumps into the "public network category", And now the firewall rules for public will apply and nothing will be able to access the machine on the local network.
Maybe I'm going at this the wrong way ? The correct way might be settings metric prio for default gw ?
The thing is that I used to do that on my old hardware. But I then got lots of kernel memory leaks (Page Pool and Non Page Pool grow to many many gig.) But that could have been because of bad drivers. Got new HW now.
So question is. Should I control this using metric settings or should I force NIC2 into "private" group using registry hack(?) Or is there some other way ?