Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2003 22:11:15 +0900 (JST)
From:      MATOBA Hirozumi <matoba@st.rim.or.jp>
To:        freebsd-current@freebsd.org
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: IPFW and/or rc rule parsing not working since today's cvsup
Message-ID:  <20030713.221115.730550024.matoba@st.rim.or.jp>
In-Reply-To: <49176.192.168.1.10.1058098656.squirrel@webmail.xtaz.co.uk> <20030713.024127.730548457.matoba@st.rim.or.jp>
References:  <49176.192.168.1.10.1058098656.squirrel@webmail.xtaz.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
 On Sun, 13 Jul 2003 13:17:36 +0100 (BST), "Matt" wrote:
| The problem I have is this. In rc.conf I have the following:
| 
| firewall_enable="YES"
| firewall_script="/etc/rc.firewall"
| firewall_type="/etc/ipfw.conf"
| 
| And in /etc/ipfw.conf I have sets of rules one line at a time like:
| 
| add 00010 divert natd all from any to any via xl0
| add 00120 allow tcp from any to any 80 via xl0
| 
| etc.
| 
| This has always worked for me ever since I first started using ipfw on
| fbsd 4.1 and has always worked on current until today's cvsup. Now though
| no rules get loaded.
| 
| If I try what I have always done in the past which is ipfw -q flush &&
| ipfw /etc/ipfw.conf then it tells me:
| 
| usage: ipfw [options]
| do "ipfw -h" or see ipfw manpage for details

If your "/etc/ipfw.conf" has blank line(s), 
then you maybe met the same situation as me. 

The mail that I posted to freebsd-ipfw@freebsd.org is:
<http://docs.freebsd.org/cgi/getmsg.cgi?fetch=65503+0+archive/2003/freebsd-ipfw/20030713.freebsd-ipfw>;

There are 3 cases for calling show_usage() in ipfw2.c. 
My case is caught by "if (l == 0)" in ipfw_main(). 
The other cases are caught by "if (ac == 0)"
and by "while ((ch = getopt(ac, av, "acdefhnNqs:STtv")) != -1)
                switch (ch) {
                  ...
                  default:". 

-- 
matoba@st.rim.or.jp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030713.221115.730550024.matoba>