def generate_udp_rules(udp_ports)
firewall_rules = ""
udp_ports.each do |port|
firewall_rules << " <ns0:FirewallRule>\n <ns0:IsEnabled>true</ns0:IsEnabled>\n <ns0:Description>\#{port}</ns0:Description>\n <ns0:Policy>allow</ns0:Policy>\n <ns0:Protocols>\n <ns0:Udp>true</ns0:Udp>\n </ns0:Protocols>\n <ns0:Port>\#{port}</ns0:Port>\n <ns0:DestinationIp>Any</ns0:DestinationIp>\n <ns0:SourcePort>-1</ns0:SourcePort>\n <ns0:SourceIp>Any</ns0:SourceIp>\n <ns0:Direction>in</ns0:Direction>\n <ns0:EnableLogging>false</ns0:EnableLogging>\n </ns0:FirewallRule>\n"
end
firewall_rules
end