Date: Sun, 24 Jul 2005 13:12:39 +0200 From: Dirk GOUDERS <gouders@et.bocholt.fh-ge.de> To: questions@freebsd.org Subject: Re: ipfw and tun0 Message-ID: <200507241112.j6OBCdVx095354@karga.hank.home> In-Reply-To: Message from Chuck Swiger <cswiger@mac.com> of "Fri, 22 Jul 2005 04:52:56 EDT." <42E0B3E8.8030000@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> >>> I just started to use an ADSL line with PPPoE and want run a firewall > >>> between it and my local network. What I am wondering about is that even > >>> if I only have the default everything-blocking rule (deny ip from any to > >>> any) I still see incoming packets on tun0 with tcpdump. > > If you are using PPPoE, the system de-encapsulates the IP traffic off of the > PPP session via the tun0 interface. tun0 can be treated as your "external > interface" when writing firewall rules, setting up NAT, etc. Well, I am a little bit confused, because usually, I run machines with "real" NICs and if I activate firewall rules that drop packets from that NIC, I can run tcpdump on that NIC and will not see the dropped packets. This is the naive view, I have about this: NIC device (e.g. xl0) ----------------------------------------------------- packets -> packets -> ... packets -> packets -> ----------------------------------------------------- ^ ^ | | Here, ipfw checks Here, tcpdump listens the packets against and doesn't see dropped its rules and probably packets drops packets In the case of tun0, this order seems to be reverse... > Right. This implies that the firewall rules are working. If you > want to see what the situation looks like to a client machine > behind the firewall, either tcpdump on a client machine, or tcpdump > on the internal interface of the firewall box... Does that mean, that there is no way, to inspect the network traffic from tun0 after it has been "cleaned up" by ipfw and that is not forwarded to the internal NIC? Dirk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507241112.j6OBCdVx095354>