This website requires JavaScript.
Explore
Help
Sign In
d
/
freebsd-nq
Watch
1
Star
0
Fork
0
You've already forked freebsd-nq
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
163529c2b3
freebsd-nq
/
sbin
/
ipfw
/
Makefile
9 lines
84 B
Makefile
Raw
Normal View
History
Unescape
Escape
Convert this Makefile to the usual style.
2000-10-06 11:18:11 +00:00
# $FreeBSD$
Submitted by: Whistle Communications (archie Cobbs) these are quite extensive additions to the ipfw code. they include a change to the API because the old method was broken, but the user view is kept the same. The new code allows a particular match to skip forward to a particular line number, so that blocks of rules can be used without checking all the intervening rules. There are also many more ways of rejecting connections especially TCP related, and many many more ... see the man page for a complete description.
1997-06-02 05:02:37 +00:00
Convert this Makefile to the usual style.
2000-10-06 11:18:11 +00:00
PROG
=
ipfw
The new ipfw code. This code makes use of variable-size kernel representation of rules (exactly the same concept of BPF instructions, as used in the BSDI's firewall), which makes firewall operation a lot faster, and the code more readable and easier to extend and debug. The interface with the rest of the system is unchanged, as witnessed by this commit. The only extra kernel files that I am touching are if_fw.h and ip_dummynet.c, which is quite tied to ipfw. In userland I only had to touch those programs which manipulate the internal representation of firewall rules). The code is almost entirely new (and I believe I have written the vast majority of those sections which were taken from the former ip_fw.c), so rather than modifying the old ip_fw.c I decided to create a new file, sys/netinet/ip_fw2.c . Same for the user interface, which is in sbin/ipfw/ipfw2.c (it still compiles to /sbin/ipfw). The old files are still there, and will be removed in due time. I have not renamed the header file because it would have required touching a one-line change to a number of kernel files. In terms of user interface, the new "ipfw" is supposed to accepts the old syntax for ipfw rules (and produce the same output with "ipfw show". Only a couple of the old options (out of some 30 of them) has not been implemented, but they will be soon. On the other hand, the new code has some very powerful extensions. First, you can put "or" connectives between match fields (and soon also between options), and write things like ipfw add allow ip from { 1.2.3.4/27 or 5.6.7.8/30 } 10-23,25,1024-3000 to any This should make rulesets slightly more compact (and lines longer!), by condensing 2 or more of the old rules into single ones. Also, as an example of how easy the rules can be extended, I have implemented an 'address set' match pattern, where you can specify an IP address in a format like this: 10.20.30.0/26{18,44,33,22,9} which will match the set of hosts listed in braces belonging to the subnet 10.20.30.0/26 . The match is done using a bitmap, so it is essentially a constant time operation requiring a handful of CPU instructions (and a very small amount of memmory -- for a full /24 subnet, the instruction only consumes 40 bytes). Again, in this commit I have focused on functionality and tried to minimize changes to the other parts of the system. Some performance improvement can be achieved with minor changes to the interface of ip_fw_chk_t. This will be done later when this code is settled. The code is meant to compile unmodified on RELENG_4 (once the PACKET_TAG_* changes have been merged), for this reason you will see #ifdef __FreeBSD_version in a couple of places. This should minimize errors when (hopefully soon) it will be time to do the MFC.
2002-06-27 23:02:18 +00:00
SRCS
=
ipfw2.c
Uncommented WARNS=0. ipfw2.c is full of printf format errors that are fatal on alphas. Fixed setting of WARNS. WARNS should never be set unconditionally, since this breaks testing of different WARNS values by setting it at a higher level (e.g., on the command line).
2002-07-11 17:33:37 +00:00
WARNS
?=
0
- Backout botched attempt to introduce MANSECT feature. - MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
MAN
=
ipfw.8
New man pages from Ugen. Delete my old, first attempt. I only hope that the english in Ugen's two replacement pages is not too impenetrable! :-) [Note: Poul - please pull these into the BETA branch along with the other firewall changes] Submitted by: ugen
1994-11-17 09:50:30 +00:00
Add the ipfw command, for IP firewall construction. Submitted by: danny ugen
1994-10-28 15:06:53 +00:00
.
i
n
c
l
u
d
e
<
b
s
d
.
p
r
o
g
.
m
k
>
Reference in New Issue
Copy Permalink