A possible workaround is:
local_bcast_addr=192.168.122.255 # here you should rather detect this than specify it
iptables -A PREROUTING -d 255.255.255.255 -p udp -j DNAT --to-destination $local_bcast_addr iptables -A PREROUTING -d 255.255.255.255 -p tcp -j DNAT --to-destination $local_bcast_addr iptables -A OUTPUT -d 255.255.255.255 -p tcp -j DNAT --to-destination $local_bcast_addr iptables -A OUTPUT -d 255.255.255.255 -p udp -j DNAT --to-destination $local_bcast_addr
Not very elegant, and may not work for some cases, but works for tinc's LocalDiscovery, which relies on UDP broadcast.
A possible workaround is:
local_bcast_ addr=192. 168.122. 255 # here you should rather detect this than specify it
iptables -A PREROUTING -d 255.255.255.255 -p udp -j DNAT --to-destination $local_bcast_addr
iptables -A PREROUTING -d 255.255.255.255 -p tcp -j DNAT --to-destination $local_bcast_addr
iptables -A OUTPUT -d 255.255.255.255 -p tcp -j DNAT --to-destination $local_bcast_addr
iptables -A OUTPUT -d 255.255.255.255 -p udp -j DNAT --to-destination $local_bcast_addr
Not very elegant, and may not work for some cases, but works for tinc's LocalDiscovery, which relies on UDP broadcast.