#NEWLINE# def floating_ebtables_rules( fixed_ip , network ) : #NEWLINE# #INDENT# 'Makes sure only in-network traffic is bridged.' #NEWLINE# return ( [ ( 'PREROUTING --logical-in %s -p ipv4 --ip-src %s ! --ip-dst %s -j redirect --redirect-target ACCEPT' % ( fixed_ip [ 'bridge' ] , fixed_ip , network [ 'cidr' ] ) ) ] , 'nat' )