From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ido Schimmel Subject: Re: question regarding Linux kernel handling of packets received that has src address of interface address Date: Fri, 5 Oct 2018 13:27:01 +0300 Message-ID: <20181005102701.GA20105@splinter> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org To: Mikael Abrahamsson Return-path: Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:38835 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJERZP (ORCPT ); Fri, 5 Oct 2018 13:25:15 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Oct 05, 2018 at 10:50:24AM +0200, Mikael Abrahamsson wrote: > So my question is where in the Linux kernel is this check performed that > disallows incoming packets that have src IP address the same as an interface > address? Can it be turned off? Is there a way to "hack around it", for > instance with iptables and re-write the source address of the packet before > it hits this check (I don't care about the source address when the packet is > delivered to the application, it can be re-written to anything). Did you set 'accept_local' [1] ? " accept_local - BOOLEAN Accept packets with local source addresses. In combination with suitable routing, this can be used to direct packets between two local interfaces over the wire and have them accepted properly. default FALSE " I tried to create a setup similar to yours and it seems to be working for me. 1. https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt