Search code examples
dockerkubernetesnetwork-programmingpolicy

Having two network policy files


What will happen if I have two network policy files?

  1. In first file I'm not allowing traffic to any IP.
  2. In the second I'm allowing traffic to only one IP.

So, will it allow the traffic to the allowed IP?

Is it the OR between the two files?


Solution

  • yes .. it allows traffic to the 'allowed IP'. instead of comparing with AND or OR analogy, it is more relatable with iptables or firewall rules ex: drop every packet except there is a rule to accept the packet if it is to/from a IP Address.