f



Ipfw won't load rules from file on FreeBSD 4.10

Hi!

I'm currently installing FreeBSD 4.10 but have some problems with the ipfw
command. I can't manage to load rules from a file, even thought i do as said
in the man page synopsis. Ipfw just output the error "ipfw: bad arguments,
for usage summary ''ipfw''".

I have moved this rules-file from an other FreeBSD 4.6 machine where
everything works ok. I have renamed the apropriate interfaces in the file as
well. I have recompiled the kernel with IPFIREWALL and everything i had on
my old machine (and yes, i've tried writing a new rule-file with just one
simple rule, but that doesn't work either).

In the ipfw synopsis it says i should use "ipfw [-cfnNqS] [-p preproc
[preproc-flags]] pathname" where pathname is the full path to my rules file
containing lines like:

"00050 allow tcp from any to any 50 via rl0"...

If i input the lines from my rule-file manually, one by one on the command
line, it works fine, but i really like the feature to "ipfw list" the
commands to a file and then read them back.

Any ideas what i or ipfw is doing wrong??

Mats


0
Mats
8/19/2004 12:46:12 AM
comp.unix.bsd.freebsd.misc 13187 articles. 1 followers. Post Follow

5 Replies
482 Views

Similar Articles

[PageSpeed] 16

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In comp.unix.bsd.freebsd.misc, Mats dared to utter,
> "00050 allow tcp from any to any 50 via rl0"...
>
> Any ideas what i or ipfw is doing wrong??

One.

add 00050 allow tcp from any to any 50 via rl0

- -- 
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBJCo6lKR45I6cfKARAiJ1AKCgZPgOAq9u45VELanAhzhEWslk7gCgraJc
3geGeRGf8SonUmntzH/WW3E=
=UW0A
-----END PGP SIGNATURE-----
0
Alan
8/19/2004 4:20:07 AM
----- Original Message ----- 
From: "+Alan Hicks+" <alan@lizella.netWORK>
Newsgroups: comp.unix.bsd.freebsd.misc
Sent: Thursday, August 19, 2004 6:20 AM
Subject: Re: Ipfw won't load rules from file on FreeBSD 4.10


> > Any ideas what i or ipfw is doing wrong??
>
> One.
>
> add 00050 allow tcp from any to any 50 via rl0

That was a good one! :)

Although it was a while since i messed with this, i seem to remember just
outputting the rules to file and read them back in without having to alter
the outputted rule-file. Maybe i'm just confusing ipfw with iptables... :-P

If so, is there a simple way to include the "add" command on each line while
dumping from ipfw or while reading the rules from a file?

Thanks for your help!

Mats


0
Mats
8/19/2004 10:36:43 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In comp.unix.bsd.freebsd.misc, Mats dared to utter,
> If so, is there a simple way to include the "add" command on each line while
> dumping from ipfw or while reading the rules from a file?

Well, you'd typically do this with a text processor like sed or awk.
Shouldn't be too difficult a task if you've used either before.

- -- 
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBJL2UlKR45I6cfKARAmGEAKCNa5u7zhaYg1HGDpq/1xTN3KpzwACgk1uL
jXtEh+eHa/u7GOgiGzhEbiI=
=EDpi
-----END PGP SIGNATURE-----
0
Alan
8/19/2004 2:48:49 PM
Mats wrote:

> If so, is there a simple way to include the "add" command on each line
> while dumping from ipfw or while reading the rules from a file?

ipfw list | sed -e "s/^/add /g"

Thomas

0
Thomas
8/19/2004 3:01:22 PM
Thomas Wolf wrote:


> ipfw list | sed -e "s/^/add /g"

The g is superfluous, there's never more than one left anchor in a line.
0
Michael
8/20/2004 4:56:51 PM
Reply:

Similar Artilces:

Jedit 4.1 on FreeBSD 4.8 and Diablo-JDK1.3.1 - SIGILL 4
Hello, all - I've searched through Google (and on the Jedit site at sourceforge) for any other posts relative to this problem, and haven't found any. This post is to compare notes and see if this is truly unique to this machine or if someone else has seen this issue and has a ready answer for it. The installation of "Jedit" through the FreeBSD ports system seems to go fine - all the checksums match - and, since the installation program uses a "jar" file rather than the typical source code compile (and that throws no error messages), it seems as through ...

Files won't display, directory won't delete, drive won't format
After having a few slow-access problems, I ran a virus scan (McAfee) on my D: drive (second HDD, 15Gb). To my surprise, the scan listed a directory and files which I didn't recognise: I didn't note any full pathnames, but a typical one was something like D:\RECYCLER\S-1-5-21... Dd159.zip . I wondered if this was anything to do with the Recycle bin, despite the fact that I'd emptied it immediately before the scan. No viruses were detected, but when I ran an error check I got the message "the scan could not be completed". As a precaution I decided to ba...

BIND 9.10.1rc2 won't build on FreeBSD 10-STABLE
--ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I can't build BIND 9.10.1rc2 on recent FreeBSD 10-STABLE. I have tried on both i386 and amd64 variants of the operating system. BIND 9.10.1rc1 builds fine, as did the beta releases. Failure looks like this: making all in /build/bind/bind-9.10.1rc2/bin/python make[3]: don't know how to make dnssec-checkds. Stop make[3]: stopped in /build/bind/bind-9.10.1rc2/bin/python *** Error code 1 Stop. make[2]: stopped in /build/bind...

NUT won't restart (FreeBSD 4.11)
Hi all, I'm using Network UPS Tools from ports/sysutils to manage two Belkin UPSes using the Belkin Universal driver, "BelkinUnv". All works fine from a cold boot. However, if the UPS daemons are stopped and restarted, then the first UPS won't sync up with the driver daemon. The daemon complains about stale data, and the kernel complains about character overruns on sio2 (which, at least for FreeBSD 4.x, generally means that something's sending bytes to that serial port but no process is reading them). All is well if I reboot the FreeBSD server. No need to power-cycle the UPS. Not the end of the world, just rather annoying - this isn't Windows, so it should never be necessary to reboot unless you've rebuilt the kernel! Thanks for any thoughts, - Martin. Martin wrote: > Hi all, > > I'm using Network UPS Tools from ports/sysutils to manage two Belkin UPSes > using the Belkin Universal driver, "BelkinUnv". > > All works fine from a cold boot. However, if the UPS daemons are stopped > and restarted, then the first UPS won't sync up with the driver daemon. The > daemon complains about stale data, and the kernel complains about character > overruns on sio2 (which, at least for FreeBSD 4.x, generally means that > something's sending bytes to that serial port but no process is reading > them). > > All is well if I reboot the FreeBSD server. No n...

can't mount xp file system on freebsd 4.7
mount_ntfs /dev/ad1s1 /ntfs mount_ntfs: /dev/ad1s1: Device not configured I've recompiled my kernel with NTFS option set, but still no luck. has anyone else had any success with this? In article <3F21B9FE.4090007@cox.net>, Aaron Prillaman wrote: > mount_ntfs /dev/ad1s1 /ntfs > mount_ntfs: /dev/ad1s1: Device not configured > > I've recompiled my kernel with NTFS option set, but still no luck. has > anyone else had any success with this? Does the /dev/ad1s1 device not exist? Kris In article <3F23073A.5020700@cox.net>, Aaron Prillama...

Firefox on Freebsd 4.11 won't run (newbie question)
--------------584875E51FC205D4CF0F8EEE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I just upgraded my system to FreeBSD 4.11 and did a pkg_add -r to add firefox. When I try to run it I get the following: /usr/X11R6/bin-> /usr/X11R6/bin->firefox /usr/libexec/ld-elf.so.1: Shared object "libXinerama.so.1" not found, required by "firefox-bin" /usr/X11R6/bin-> --- Any help would be appreciated. Thanks in advance. -- Ravi I Singh e-mail: risingh@telusplanet.net --------------584875E51FC205D4CF0F8EEE Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> Hello, <p>&nbsp;&nbsp; I just upgraded my system to FreeBSD&nbsp;4.11 and did a pkg_add -r to add firefox.&nbsp; When I try to run it I get the following: <br>&nbsp; <p>/usr/X11R6/bin-> <br>/usr/X11R6/bin->firefox <br>/usr/libexec/ld-elf.so.1: Shared object "libXinerama.so.1" not found, required by "firefox-bin" <br>/usr/X11R6/bin-> <br>--- <p>&nbsp;&nbsp; Any help would be appreciated. Thanks in advance. <br>&nbsp; <pre>-- Ravi I Singh e-mail: risingh@telusplanet.net </pre> &nbsp;</html> --------------584875E51FC205D4CF0F8EEE-- I had this same probl...

Willie won't, Willie won't, won't go!
Ah yes, some 70s nostalgia tunes. ...

Help! GD 2.06 Won't Compile (FreeBSD 4.8)
I'm completely puzzled here. I've been able to compile and install just about everything...until GD. Here's what happens: rufus# perl Makefile.PL NOTICE: This module requires libgd 2.0.5 or higher. it will NOT work with earlier versions. For earlier versions of libgd, use GD version 1.41. Where is libgd installed? [/usr/lib] /usr/local/lib Please choose the features that match how libgd was built: Build JPEG support? [y] Build FreeType support? [y] If you experience compile problems, please check the @INC, @LIBPATH and @LIBS arrays defined in ...

FreeBSD 4.9 CD won't boot on Toshiba Tecra 8000
I've burned a 4.9 ISO onto a CD-R and it won't boot on my Tecra 8000! The CD will boot on another PC but just not on this one. Also, the Toshiba DOES boot other CDs. For example, I was able to boot from CD and install Mandrake 9.2 on the Tecra. So I'm not sure why this particular CD won't boot on the Tecra. Any ideas? I don't have a floppy drive so I'm not sure how else to install FreeBSD. Can I install FreeBSD from Linux (Mandrake 9.2)? Are there any other options I should consider? "Ned Flanders" <anonmanshun@yahoo.com> wrote in m...

FreeBSD 4.5 and 5.2.1 installer won't boot
I'd really like to install FreeBSD on my home PC. Awhile back, I burned the 4.5-stable ISO however it didn't boot and froze at some point after detecting the hard drives. Since I needed to get a project done, I installed a Linux distribution, and since Linux pisses me off I went back to Win2k after the project. Still wanting FreeBSD, I downloaded the 5.2.1 install ISO and once again, it freezes. The last thing shown are the device strings of my 2 hard drives. In both cases, the common piece of hardware is the ECS K7S5A mainboard. With the 5.2.1 ISO, I choose both the reg...

MATLAB 7 won't start on 10.4.7
I just installed MATLAB 7 fresh on my system and it won't boot. I thought I was having problems with the License Manager, but both Console (crash reporter log for MATLAB) and the X11 terminal print this when I try to launch MATLAB: dyld: Library not loaded: ../../bin/mac/libut.dylib Referenced from: /Applications/MATLAB7/bin/mac/MATLAB Reason: image not found Trace/BPT trap Any ideas? Thanks in advance if so...! Anybody able to help? I can't find anything on mathworks or Google... Andrman wrote: > I just installed MATLAB 7 fresh on my system and it won't boot. I >...

ntp-dev-4.2.1p250-RC won't build on FreeBSD 6.0
ntp-dev-4.2.1p250-RC It seems ntpd_intres.c in this RC needs EAI_NODATA to be defined. It should be IFDEF'd like it is in ntpdc.c and ntpq.c. Bug #611 is filed. - John John Kline wrote: > ntp-dev-4.2.1p250-RC > > It seems ntpd_intres.c in this RC needs EAI_NODATA to be defined. It > should be IFDEF'd like it is in ntpdc.c and ntpq.c. > > Bug #611 is filed. > There was a bug report #438 on exactly the same issue but this is a situation where it just got reintroduced. #ifdef is probably the best solution here. I was just reading RFC 3493 which is informat...

couldn't load file (error 262) during 'load'
Hi all, I am getting an error similar to the following on an AIX box running TCL: tcl> package require Test Error: couldn't load file "/..../test.so": Error 262 occurred. while executing "load [file join [file dirname [info script]] \ Shared/sharedio[info sharedlibextension]] sharedio" ...... I presume there is a problem with the .so but would like to be able to find out what, exactly... Looking at the TCL code, I can see that this error is printed from unix/tclLoadDl.c and a few others - but I haven't been able to trace the origin of the value...

Should I run Freebsd 4.10 or freebsd 5.3
I am currently running freebsd 4.9 and have had no problems with it. I recently purchased a new server and I am debating on installing 4.10 or 5.3. Just want some opinions as to which is more stable. Thanks Darrell wrote: > I am currently running freebsd 4.9 and have had no problems with it. I > recently purchased a new server and I am debating on installing 4.10 or > 5.3. Just want some opinions as to which is more stable. > BTW AFAIK 4.11 is available. Personally opted for obsd 3.6 because fbsd (4.11 and 5.3) apparently has no driver for my Initio PCI SCSI controller. But fbsd is certainly a fine OS if it supports your hardware. Lux On Sun, 13 Feb 2005 13:35:06 -0500, Darrell wrote: > I am currently running freebsd 4.9 and have had no problems with it. I > recently purchased a new server and I am debating on installing 4.10 or > 5.3. Just want some opinions as to which is more stable. More stable? Of course 4.x. 5.x is in a process of becoming as stable as 4.x. -- takeda@IRCnet.EFnet, ICQ# 15827691, TLEN: taked4, YahooIM: takeda64 *http://eggdrop.takeda.tk - forum dot. botów na bazie eggdropa* *http://eggwiki.takeda.tk - pomoc w u┼╝ywaniu botów po polsku* In article <itWdnRC77ptDAJLfRVn-uQ@buckeye-express.com>, Darrell <dbetts22@yahoo.com> wrote: >I am currently running freebsd 4.9 and have had no problems with it. I >recently purchased a new server and I am debating on i...

4.2.1-RC1 on FreeBSD 4.11 doesn't seem to discipline the local clock
I've got a Soekris 4501 (three actually) running FreeBSD 4.11. I just added a modem to pickup ACTS with, and discovered that ntp in base FreeBSD isn't compiled with it as a valid refclock? So, I pulled down the 4.2.1 release candidate, configured with just --enable-acts, and gave it a shot. The clock just slowly drifted away from it's peers and ACTS. Up to this point, using base ntpd from FreeBSD and multiple internet sources (and it's 3 local peers I maintain) it has stayed within 10ms, I cut the cord when it drifted out past 150ms this evening. Should I be using ...

pg_autovacuum won't make on FreeBSD
4.8-STABLE FreeBSD 4.8-STABLE i386 sahlins# cd postgresql-7.4.2/contrib/pg_autovacuum sahlins# make "../../src/Makefile.global", line 38: Missing dependency operator "../../src/Makefile.global", line 41: Need an operator "../../src/Makefile.global", line 45: Need an operator "../../src/Makefile.global", line 66: Need an operator "../../src/Makefile.global", line 67: Need an operator "../../src/Makefile.global", line 69: Need an operator "../../src/Makefile.global", line 70: Need an operator "../../src/Makef...

Perl's DBD::mysql will 'make' but won't 'make test' on Solaris 10
Hey all, I've posted this previously on a mysql group to no avail, so I thought I might ask and see if anyone here has any ideas since it seems to be having problems with a Solaris supplied library (libmtmalloc.so.1) I am running solaris 10, with the solaris cc compiler. the module compiles fine. however, the first test of 'make test' fails as below. I've cut most of the bloated output, but if anyone thinks it would help I could certainly post it. If this has nothing to do with Solaris let me know, and accept my apologies. TIA, -jp Running make test PERL_DL_NONLAZY=1 /u...

Preview suddenly can't handle PS filesYesterday, on my Powerbook running Tiger 10.4, Preview was able to open,and display both PS and PDF files. It handled PS files by popping up a little,window sayi
Yesterday, on my Powerbook running Tiger 10.4, Preview was able to open and display both PS and PDF files. It handled PS files by popping up a little window saying it was converting to PDF, but it worked. Today, Preview can handle PDF files, but not PS. When I tell it to open a PS file, it almost instantly displays a little popup window that says: File error. Couldn't open the file OK When I press the OK button, I get another small window that is entirely grey, except for the title bar that contains the file name (ending with .pdf...

"You don't have permission": Why won't this file download?
I just want people to click on a link to download a file. I've done it before, but this is a new computer and I must be missing something. (Possibly an Apache configuration setting?) Here is the source for the link that generates the error: <a href="./procedures/ODBC_installation.pdf">ODBC driver installation procedure</a><br /> The permissions on the file and the directory containing it are wide open! I've tried everything I can think of. Here is the error: ************************** begin error page ************************** For...

FreeBSD loader won't boot any other OS
I have both Linux and FreeBSD installed on a machine, so when I first boot up, I see the following screen: F1 Linux F3 FreeBSD Default: F1 Even when I press F1, it is always FreeBSD that boots rather than Linux. I've also tried pressing F1 and simply waiting without pressing Enter, but it's still FreeBSD that boots. Does anyone know how I can get Linux to boot rather than FreeBSD? =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ,--- Jimmy Miller writes: | I have both Linux and FreeBSD installed on a machine, so when I first | boot up, I see the following screen: | F1 Linux | F3 FreeBSD | Default: F1 | Even when I press F1, it is always FreeBSD that boots rather than | Linux. I've also tried pressing F1 and simply waiting without | pressing Enter, but it's still FreeBSD that boots. | Does anyone know how I can get Linux to boot rather than FreeBSD? Use GRUB. Somehow, boot into your Linux installation and reinstall GRUB. Modify your GRUB's configuration file( /boot/grub/grub.conf ). Following is my 'grub.conf' . =2D ----8<----8<----- default=3D0 timeout=3D5 splashimage=3D(hd0,2)/grub/gnubg.xpm.gz hiddenmenu title Fedora (2.6.23.1-10.fc7) root (hd0,2) kernel /vmlinuz-2.6.23.1-10.fc7 ro root=3DLABEL=3D/ rhgb quiet initrd /initrd-2.6.23.1-10.fc7.img title FreeBSD 7.0-BETA1.5 root (hd0,0,a) kernel /boot/loader =2D ---->8---->8----- HTH =2D --=20 Ashish Shukla =E0=A4=86=E0=A4...

FreeBSD 7 lpr won't print
Hi, I have FreeBSD 7 on a T43. FreeBSD Gargoyle.brendhanhorne.com 7.0-STABLE FreeBSD 7.0-STABLE #2: Mon Jun 30 23:44:55 EDT 2008 root@Gargoyle.brendhanhorne.com:/usr/obj/usr/src/sys/STONE I can print from cups related programs such as firefox, openoffice, thunderbird.However I cannot print from programs that use the lpr settings such as nedit, acroread, and xpdf. When I try to print from nedit I get this error: Unable to print lpr:EWrror - no default destination available. The destination for lpr appears correct: [bhorne@Gargoyle:bhorne, 06:55 PM, Tue Jul 01]>which lpr /usr/local/bin/lpr The /etc/make.conf contains WITH_CUPS=YES CUPS_OVERWRITE_BASE=YES WITHOUT_LPR=YES I have the following cups related ports installed. cups-base-1.3.7_3 Common UNIX Printing System cups-pdf-2.4.7_1 A virtual printer for CUPS to produce PDF files cups-pstoraster-8.15.4_2 Postscript interpreter for CUPS printing to non-PS printers lpr-wrapper-0.6_3 A user level printer frontend However still no ability to print. So what can I do to gain the ablity to print from lpr? Sincerely, Brendhan Understudy wrote: > The /etc/make.conf contains > WITHOUT_LPR=YES GO_OUTSIDE_WITHOUT_PANTS=YES Somehow I just don't think that's right. - M Michael Sierchio wrote: > Understudy wrote: > >> The /etc/make.conf contains > >> WITHOUT_LPR=YES > > GO_OUTSIDE_WITHOUT_PANTS=YES > > S...

Can't buildworld
I have done a cvs on my FreeBSD 4.9-RELEASE system and am now wanting to make buildworld. The problem is, each time I attempt one the build will run for about one hour and then falls over when it reaches: /usr/src/lib/libc/../libc/net/herror.c: In function 'herror': /usr/src/lib/libc/../libc/net/herror.c:97 syntax error before '~' *** Error code 1 Stop in /usr/src/lib/libc. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. 1995.499U 433.690S 43:27.63 93.1% 1394+1763k 20696+3006io 2055pf+0w (Please note I ran the command with 'time' in front.) I have re cvs'd to elimante the chance of a server upload during my inital cvs but this didn't fix the problem. I have ensured that 'date' is set correctly. I'm relatively certain there is no RAM issue with the computer but if necessary I will replace the RAM stick for another. Is there anything else I may have done wrong or something I can check? It appears the error occurs at a slightly different point each time however usually having something to do with 'libc'. Any help would be greatly appreciated. Thanking you in advance, Sh4d03 -- If you require more assistance or if my suggestion works please E-mail me at sh4d03 [at] TPG [dot] com [dot] au. Additionally, if you are able to provide assistance to me and wish to E-mail me directly please also feel free to contact me in thi...

I can't load a dynamic service on CentOS-4.4, what's the reason?
I built a network service named nman and a service configer to load that service. It works on windows xp, but It dont works on centos4.4 ACE is V5.4.10 The output as follows: ============================================ # ./configer -d -f svc.conf ../configer, V1.0.0.0, Build-May 23 2007-17:00:42 Configer(9341|3086554816) Starting ... starting up daemon ./configer ACE_DLL_Handle::open: calling dlopen on "nman" ACE_DLL_Handle::open: Trying to open DLL nman with nman.so name ACE_DLL_Handle::open: Trying to open DLL nman with libnman.so name ACE_DLL_Handle::open: Trying t...

freebsd won't detect mouse durring install
why won't freebsd 5.2 detect a mouse durring install? I'm trying to get it running in virtual pc 2004 and told it to auto connect to the ahrdware or something for the mouse and it wouldn't do anything. no mouse. then i said quit in that screen by using the keyboard and all that happened was it went to a black screen and i had to quit. comp.unix.bsd.freebsd is not widely propagated, so you won't necessarily get much help here (in comp.unix.bsd.freebsd). See http://www.freebsd.org/support.html for better ideas... [followups redirected accordingly] "heavenboun...

Web resources about - Ipfw won't load rules from file on FreeBSD 4.10 - comp.unix.bsd.freebsd.misc

Resources last updated: 2/27/2016 12:38:40 AM