Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2017 22:50:28 +0200
From:      "no@spam@mgedv.net" <nospam@mgedv.net>
To:        <freebsd-questions@freebsd.org>
Subject:   pf/nat guru needed: fwd of packet to 255.255.255.255
Message-ID:  <002101d346c0$65ef67d0$31ce3770$@mgedv.net>

next in thread | raw e-mail | index | archive | help
hi folks,

short: anyone out there knows, how to redir & forward packets to
255.255.255.255?

preface: i need to get a crappy, stupid, very (!) wrong programmed device
running.
and i know this crapdev violates RFCs, so this is the wrong story for RTFM
hints ;)

the BSD box setup:
freebsd 11.1, amd64.
- interface "A": 10.10.21.1/24, MTU1500
- interface "B": 10.10.22.1/24, MTU1500

the (crapdev) source generates an ipv4 UDP packet as follows:
- source address 10.10.21.11, port >1023
- target hw addr: ff:ff:ff:ff:ff:ff
- target ipv4 addr: 255.255.255.255 port 4444
- payload ~ 500 bytes, so it fits inside 1 packet.

the bsd box receives the packet on interface A.
i tried really ALL imaginable rdr / nat options. 
the "most close to success" rule was:
rdr pass log (all) on $if_A $pr_udp from $ip_crapdev $p_high to $ip_bcast
$p_4444 -> $ip_bc_B $p_4444
... which obviously does not work.
the translation succeeds, as soon as the traffic is allowed, a state is
created.
but no packet leaves the BSD box at all - checked with monitor ports on
switch.

is there any rule method i can force the packet to leave the BSD box ever
again?
best case: on interface B, either to a unicast or bcast addr on B's subnet?

any help is appreciated. :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002101d346c0$65ef67d0$31ce3770$>