Re: Impossible to IPfilter this?

From: Crist J. Clark (crist.clark_at_attbi.com)
Date: 06/11/03

  • Next message: Mitch: "user can't member more than 15 group"
    Date: Tue, 10 Jun 2003 16:07:44 -0700
    To: Lupe Christoph <lupe@lupe-christoph.de>
    
    

    On Sat, Jun 07, 2003 at 01:15:40PM +0200, Lupe Christoph wrote:
    > Hi!
    >
    > I'm trying to increase security on my FreeBSD 4.8 firewall/DSL router/VPN
    > router.
    >
    > My problem is with firewalling the VPN part. I'm using a tunnel to a
    > RedHat 7.1 box running FreeS/WAN. This tunnel allows traffic from my
    > internal net (172.17.0.0/24) to that box only:
    >
    > spdadd 172.17.0.0/24 $REDHAT/32 any -P out ipsec esp/tunnel/$MYADDR-$REDHAT/unique;
    > spdadd $REDHAT/32 172.17.0.0/24 any -P in ipsec esp/tunnel/$REDHAT-$MYADDR/unique;
    >
    > What I want to do is prohibit traffic from $REDHAT to 172.17.0.7, the
    > internal address of this FreeBSD box. I'm using IPFilter, so I inserted
    > a rule like this:
    >
    > block in log quick from any to 172.17.0.7
    >
    > It is not attached to any interface, so it should supposedly work even
    > for tunnelled traffic. Only it doesn't.

    Not sure who told you that, but it won't affect tunneled traffic. Not
    specifying an interface just means that it will be applied to all
    interfaces.

    [snip]

    > Any hints how to resolve this are welcome. I don't think this is a
    > general IPFilter problem, hence I'm asking on this mailing list rather
    > than that for IPFilter.
    >
    > Thank you,
    > Lupe Christoph
    >
    > PS: There was talk about the sequence IPFW/IPNat/IPFilter get invoked.
    > It would be interesting to put the IPSec code in this picture. Are
    > IPSec packets going through *any* of them? With/out GIF?

    Here's what happens (approximately), the packets get fed to the
    ip_input() routine. They pass through IPFilter then IPFW. Later they
    find themselves in IPsec processing where the packets are taken out of
    the tunnel. At this point, the packets are fed back into ip_input(),
    BUT the reinjected packets skip all firewall processing on this
    pass. With the IPSEC_FILTERGIF option set, the packets _will_ go
    through the firewall, IPFilter then IPFW, after IPsec processing.

    However, there may be an ugly hack to try here. I think I might try it
    on one of my experimental setups at home. It may be possible to set up
    some additional IPsec policies to block the traffic you want to stop.

    -- 
    Crist J. Clark                     |     cjclark@alum.mit.edu
                                       |     cjclark@jhu.edu
    http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
    _______________________________________________
    freebsd-security@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-security
    To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"
    

  • Next message: Mitch: "user can't member more than 15 group"

    Relevant Pages

    • Re: connecting thru remote desktop connection
      ... Ask your network administrator to create a tunnel through ... your firewall so that packets for port 3389 are forwarded ...
      (microsoft.public.windowsxp.general)
    • Re: [SLE] Openvpn question
      ... >> I think you need to turn IP forwarding as well as have the tunnel up. ... >Can I do that without the firewall up? ... # Runtime-configurable parameter: forward IP packets. ...
      (SuSE)
    • Re: RV042 - Does anyone understand it? Documentation?
      ... if one is using an RV042 for VPN, then what affect does the routing table have on the VPN packets? ... When the packet is received at the other end of the tunnel, it will still be destined for a "foreign" private subnet. ... In other words the range of IP's you are trying to reach and the range of IP's the traffic is coming from MUST be included in the subnets for the encrypted tunnel. ...
      (comp.dcom.vpn)
    • Re: RV042 - Does anyone understand it? Documentation?
      ... Launch a packet destined for a "foreign" private subnet. ... Route such packets at their source to the LAN address of the RV042 VPN ... When the packet is received at the other end of the tunnel, ... i.e. the packet is destined neither for the local nor the remote subnet. ...
      (comp.dcom.vpn)
    • Re: Exchange Outlook und Sygate Personal Firewall
      ... > Ich versuche per Outlook mein Exchange Postfach abzurufen. ... wenn meine Sygate Personal Firewall deaktiviert ist. ... Ich hab deinen Beitrag so verstanden, daß der Tunnel nur aufgebaut ...
      (microsoft.public.de.exchange)