Firewalls separate areas of different security requirements. This major task leads to problems regarding the network connectivity and performance of various applications. In particular within distributed systems, like a Grid an unobstructed communication, which is essential for using distributed resources, is not possible. Furthermore Grid applications often use multiple ports dynamically and in parallel. This raises the challenge of a dynamic configuration of firewalls. Current solutions are only isolated or proprietary solutions because they only address certain kinds of firewall, e.g. Net filter and Cisco PIX. This paper describes a solution based on UDP hole punching.