Re: about ipfw

From: Joseph (jolt@nicholasofmyra.org)
Date: 12/19/01


From: "Joseph" <jolt@nicholasofmyra.org>
To: <slack@suntop-cn.com>, <freebsd-security@FreeBSD.ORG>
Date: Wed, 19 Dec 2001 08:47:45 -0500

This is certainly a FreeBSD-security question. You are missing a "from".
Also, try allow instead of pass.

ipfw add allow all from any to any via lo in
ipfw add allow all from any to any via lo out

----- Original Message -----
From: <slack@suntop-cn.com>
To: <freebsd-security@FreeBSD.ORG>
Sent: Tuesday, December 18, 2001 3:44 PM
Subject: about ipfw

> 1. can ipfw do a TCP keep-state ?
> 2. how keep-state combine with "via interface" ?
> 3. this ipfw rules don't work: why ?
> ipfw add pass all any to any via lo
> ipfw add pass all any to any via ${iif}
> ipfw add divert natd all from any to any via ${oif}
> # Allow TCP through if setup succeeded
> ipfw add check-state
> ${fwcmd} add deny tcp from any to any established
>
> # Allow IP fragments to pass through
> ${fwcmd} add deny all from any to any via ${oif} frag
>
> # Allow icmp 0 3 8 11 pass
> ${fwcmd} add pass icmp from any to any via ${oif} icmptypes 0,3,8,11
>
> # Reject&Log all setup of incoming connections from the outside
> ${fwcmd} add deny log tcp from any to any in via ${oif} setup
>
> # Allow setup of any other TCP connection
> ${fwcmd} add pass tcp from any to any out via ${oif} setup keep-state
>
> # Allow DNS queries out in the world
> ${fwcmd} add pass udp from ${oip} to any 53 out via ${oif} keep-state
>
> # Allow NTP queries out in the world
> ${fwcmd} add pass udp from ${oip} to any 123 out via ${oif} keep-state
>
> ${fwcmd} add deny log all from any to any
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-security" in the body of the message
>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message



Relevant Pages

  • IPFW: Blocking me out. How to debug?
    ... # Allow UDP traceroutes: ... add allow tcp from any to any ssh in setup ... add allow tcp from any to any https in setup ... ipfw -n /etc/ipfw.rules ...
    (FreeBSD-Security)
  • Re: ipfw and ssh
    ... You neglected to include the 'add' in your first fwcmd. ... # Allow setup of incoming ssh ... Since the rest of it should be taken care of by the rest of the 'client' ipfw ...
    (freebsd-questions)
  • Re: ipfw question
    ... # Setup system for firewall service. ... ipfw add pass all from any to any via lo0 ... ipfw add deny all from any to 127.0.0.0/8 ... ipfw add deny tcp from any to any established ...
    (freebsd-questions)
  • RE: ipfw and its glory...
    ... Plus the way you have it setup, if you ever have X running then port ... Nice ruleset with the Auth and ICMP stuff, ... :ipfw add allow all from any to any via lo0 ... :ipfw add allow tcp from any to any established ...
    (FreeBSD-Security)
  • about ipfw
    ... can ipfw do a TCP keep-state? ... ${fwcmd} add deny all from any to any via $frag ... # Reject&Log all setup of incoming connections from the outside ...
    (FreeBSD-Security)