From owner-freebsd-questions@freebsd.org Mon Oct 16 21:12:29 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5991E4556B for ; Mon, 16 Oct 2017 21:12:29 +0000 (UTC) (envelope-from nospam@mgedv.net) Received: from mail.mgedv.net (mail.mgedv.net [83.64.34.254]) by mx1.freebsd.org (Postfix) with ESMTP id 7E5D66D77F for ; Mon, 16 Oct 2017 21:12:29 +0000 (UTC) (envelope-from nospam@mgedv.net) Received: from my.loop (client.my.loop [255.255.255.255]) From: "no@spam@mgedv.net" To: Subject: pf/nat guru needed: fwd of packet to 255.255.255.255 Date: Mon, 16 Oct 2017 22:50:28 +0200 Message-ID: <002101d346c0$65ef67d0$31ce3770$@mgedv.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdNGwEpwlt3jubVPTNWsuFOBK9i3kQ== Content-Language: de-at X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 21:12:29 -0000 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. :)