Environment : High end PC with a Single NIC
OS Ubuntu: LTS 24.04 Server
KVM host
I think I know the issue but I can’ t resolves it.
I have a pc with ubuntu server LTS 24.04 running KVM and multiple virtual guests. The PC has a single NIC which is running in bridge mode for KVM
One of the guests is another ubuntu LTS 24.04 server running as a router configured with 10 virtual nics all using the br0 bridge. The nics are configured 92.168.0.0/24 though to 192.168.10.0/24, each subnet on a single virtual nic.
Iptables is controlling forwarding between the interfaces, and works well with one exception
The vm which is running as a router has SSHD locked down to a single interface. And the lock down works perfectly
The issues is if I have a physical windows host (or virtual or any other type of host for that matter ) connected to let’s say the 192.168.4.0/24 network, for which this router vm is connected and routing, using ip 192.168.4.2, but virtualised to 192.168.4.1 using keepalived.
Despite ssh being blocked on 192.168.4.2. The windows host can reach the open ssh on 192.168.0.2, WITHOUT ROUTING. As proved by a tracert.
A tcp dump proves the traffic is routing via the host.
Ip tables f/w rules on the host or the vm router (to either stop forwarding or input) or inside kvm with nwfilter, do not stop the connection.
It looks like this connection is happening at layer 2 not layer 3 and in the kvm internal switch.
Apart from adding additional physical interfaces to the host and then having new bridges how can I stop this internal level 2 routing ??