1

I need to rewrite the UDP destination port on traffic which is only bridged/L2, but I could not match this traffic via iptables.

This traffic isn't going through NAT chains (it could be matched in FORWARD, but is not helpful) and ebtables don't have an option for rewriting ports, only DNAT/SNAT for altering MAC addresses.

Is there any simple solution? I have bridge-nf-call-iptables enabled, and tried to play with ebtables broute, but still no match in iptables PREROUTING.

  • According all iptables charts that i've found, all incoming packets should go trough nat table prerouting chain even bridged once. So is this chart link wrong ? – tombo Jan 17 '16 at 15:53
  • I've patched ebtables dnat kernel module to rewrite udp dst ports...kinda hotfix. – tombo Jan 17 '16 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.