PU foam can create a good seal to keep bugs/insects out of the dwelling. PU Foam will not stop rats or mice as they will find another way through. PU foam can be used in conjunction with a wire mesh to stop larger pests from entering.