From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: Change source or destination for packets arriving locally (for Direct Server Return) Date: Wed, 13 Sep 2017 12:10:05 +0200 Message-ID: <20170913101005.GA2661@salvia> References: <3B3CC463-CF1E-4020-83E0-5C10C065DD1A@creamfinance.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Thomas Rosenstein Cc: Arturo Borrero Gonzalez , Netfilter Users Mailing list On Wed, Sep 13, 2017 at 11:36:56AM +0200, Thomas Rosenstein wrote: > Hi, > > I have to check it out, but in the mean time I already wrote my small > iptables plugin to rewrite the dst-addr. > > let's call it pre-alpha: > > https://github.com/creamfinance/dstwrite Did you try packet field mangling? https://wiki.nftables.org/wiki-nftables/index.php/Mangle_packet_header_fields You need a Linux kernel >= 4.10. Syntax is simple, eg. ip daddr set 1.2.3.4