ipfw and tun0
Dirk GOUDERS
gouders at et.bocholt.fh-ge.de
Sun Jul 24 11:10:14 GMT 2005
> >>> 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
More information about the freebsd-questions
mailing list