#NEWLINE# def rule( port , action = 'ACCEPT' , source = 'net' , dest = '$FW' , proto = 'tcp' ) : #NEWLINE# #INDENT# "\n    Helper to build a firewall rule.\n\n    Examples::\n\n        from fabtools.shorewall import rule\n\n        # Rule to accept connections from example.com on port 1234\n        r1 = rule(port=1234, source=hosts(['example.com']))\n\n        # Rule to reject outgoing SMTP connections\n        r2 = rule(port=25, action='REJECT', source='$FW', dest='net')\n\n    " #NEWLINE# return { #NEWLINE# #INDENT# 'action' : action , #NEWLINE# 'source' : source , #NEWLINE# 'dest' : dest , #NEWLINE# 'proto' : source , #NEWLINE# 'dest_port' : port , #NEWLINE# #UNINDENT# }