Ok, I srewed up the iptables rules a little, so this is a working workaround script:
IFACE=$(route -n | grep '^0.0.0.0 ' | sed 's/.* //g') main_broadcast_addr=$(ip -4 addr show "$IFACE" | grep 'inet .* brd ' | sed 's/.* brd //;s/\([0-9.]*\).*/\1/')
iptables -t nat -A OUTPUT -d 255.255.255.255 -p tcp -j DNAT --to-destination $main_broadcast_addr iptables -t nat -A OUTPUT -d 255.255.255.255 -p udp -j DNAT --to-destination $main_broadcast_addr
Ok, I srewed up the iptables rules a little, so this is a working workaround script:
IFACE=$(route -n | grep '^0.0.0.0 ' | sed 's/.* //g') addr=$( ip -4 addr show "$IFACE" | grep 'inet .* brd ' | sed 's/.* brd //;s/\( [0-9.]* \).*/\1/ ')
main_broadcast_
iptables -t nat -A OUTPUT -d 255.255.255.255 -p tcp -j DNAT --to-destination $main_broadcast _addr _addr
iptables -t nat -A OUTPUT -d 255.255.255.255 -p udp -j DNAT --to-destination $main_broadcast