Comment 1 for bug 1078305

Revision history for this message
Pallinger Péter (pp-publikus) wrote :

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.