UFW Weird ICMP log record - Pinging is blocked
These are standard ICMPv4 responses. You can tell by the type and code exactly what response is being sent from the destination host to your host.
In both cases the type is 3, Destination unreachable. The code in the first case is 3, Port unreachable, and in the second case 1, Host unreachable. The first ICMP response would result in a program returning the (possibly more familiar) error Connection refused
, and the second would return the error No route to host
.
ICMP responses such as this return a copy of the packet which caused the response. Here that packet is shown in square brackets. It shows UDP traffic from your IP address to each of the remote servers, on a destination port of 389.
Since the source port is the same for every packet, this traffic is probably spoofed: it most likely originated from some unknowable place, and was sent specifically so that these ICMP responses would reach your system. It might have been an attempt at a denial of service, but if so it was a very poor attempt. It may also have been an attempt at generating an abuse complaint toward your service provider with fake traffic. It could also be someone was trying to attack those remote systems and accidentally used your IP address as the source instead of his own.
While it's most likely spoofed traffic, there is a possibility that it actually did originate from your system. However, if it had, the firewall would have seen them as responses to traffic originated by your system and would not have blocked them. You may still wish to give your system a look to ensure that you've dealt with any possible security vulnerabilities.