I have an Ubuntu server 16.04 host, with KVM running Ubuntu server 16.04 guests, the guests are bridged to a NIC (lets name it ens1) that is connected to the internet and in addition they are all connected to a private network via another NIC (lets name it ens2) that is isolated from the outer web.
I wish to block all traffic at ens2 except specific ports and allow all traffic at ens1, yet I have encountered basic problems:
At guest1 I did:
sudo ufw default deny incoming
sudo ufw default deny outgoing
sudo ufw enable
Afterwards I could not ping from guest1 to guest2 yet at guest2 I could still ping to guest1. what am I missing?
This is the result of sudo ufw status verbose
:
Status: active
Logging: on (low)
Default: deny (incoming), deny (outgoing), disabled (routed)
New profiles: skip