From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glen Huang Subject: How are tunneled interfaces masqueraded? Date: Wed, 1 Jul 2015 22:55:49 +0800 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Transfer-Encoding: 8BIT Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=4n5u8aT9R5xpCxNDpKxA7OKdL6+bUOwKGvhRQ9/RoBA=; b=tOuzFBhthDjLaaAjGBE9C5Tu14sQXS159Gq3qX1HUKpc5AUZg3iwXO7X9ESZyLwUax jDCrIItBaqzmvCi8pr0AliM4hPRLWNEkxo5k0/gvTGAZWTxeMGbziD87a4FLzJ/jF4VU qaDwEQ7T0Am9sC9G+IcZ5CfpaU/rWILsfMbz/DoiX9CgMgW7ZRMluqcmk+gaUaUdBAES eqI9yRpHIe/38OJ178C6y/FMUZMgfFw9zs0lr/IcmfzEcchXjBtwA8WX1vCqU8eXUqEq 6SD0S0sTQ5t8mdbHVikecziELjag6r7BvxxJ5YXnhJdEsH3maCsPiyUNHVbRjFc3uTBW YROQ== Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: netfilter@vger.kernel.org Hi, I'm having difficulty wrapping my head around the concept of masquerading a tunneled interface. I'd be grateful if someone could shed some light on it. First, just to make sure I understand the masquerade target right. If I masquerade a pppoe interface that connects a host to its ISP, and although ethernet frames encapsulating ppp frames travel through this interface, netfilter digs into the ppp frames and translate the encapsulated IP packets. Is this correct? If so, what about the case where the ppp interface is tunneled? Let's take pptp for an example. If a ppp interface is created with pppd, then tunneled through GRE by pptpd, and i masquerade that ppp interface, as outbound packets travel through it, what packets are translated? The ones that travels in the virtual ppp interface or the ones that is generated by pptpd and get sent to the outside world? Thank you very much.