Problem with "ipfw flush"
Dan Mahoney, System Admin
danm at prime.gushi.org
Wed Jan 24 21:18:16 UTC 2007
On Thu, 25 Jan 2007, applecom at inbox.ru wrote:
>> In trying to tweak my firewall setup I'm using a file called
>> /etc/ipfw.rules
>>
>> However, it seems even though I copy my rules perfectly to that file, the
>> system freezes up and locks me out when I do:
>>
>> ipfw -f flush; ipfw /etc/ipfw.rules
>>
>> I've also tried doing it as
>>
>> ipfw -f flush && ipfw /etc/ipfw.rules
>>
>> But to no avail.
>
> Firewall script is a common shell script. You don't need to run 'ipfw
> <script>'.
> Flushing the rules is usually done by script itself.
> For example:
> #!/bin/sh
> ipfw="/sbin/ipfw"
> ${ipfw} -f flush
> ${ipfw} <rule>
> ${ipfw} <rule>
> ${ipfw} <rule>
> ...
> This file should be executable (chmod +x). You can also put any non-ipfw
> additional commands in this file if you want.
> Try to make such script, execute it and write again about the results.
Well, I'm trying to be compliant with /etc/rc.firewall's expectations for
a rules file, which IS called with ipfw "rules.file"
-Dan
--
<Gushi> And hello kitty does not have a mouth.
<bizzy> . o O ( oh yes she does )
EfNet #macintosh, 2/21/01, some ridiculous hour of the morning
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
More information about the freebsd-questions
mailing list