summaryrefslogtreecommitdiff
path: root/sbin/pfctl
AgeCommit message (Collapse)Author
2001-07-11Error on invalid portsConstantine Sapuntzakis
2001-07-10Oops, we can't use 0 as next_addr()'s error return since 0.0.0.0 isTodd C. Miller
a valid address. Instead I add a pointer to the result as a parameter and return 0 on failure and 1 on success. Also uses inet_pton() instead of inet_aton().
2001-07-10Resolve as a host name if not an IP address; dhartmei@ OKTodd C. Miller
2001-07-10move "proto" in the nat case as wellTodd C. Miller
2001-07-09Move the proto field to be after the "on" argument which is consistentTodd C. Miller
with pf.conf. If no proto is specified tcp is assumed. dhartmei@ OK
2001-07-09Extend nat/rdr syntax. Add source/destination selection. MakeDaniel Hartmeier
interface optional. Suggested by rdump@river.com. nat [on [!] <ifname>] from (any | [!] <addr>[/<mask>]) to (any | [!] <addr>[/<mask>]) -> <addr> [proto (tcp | udp | icmp)] rdr [on [!] <ifname>] from (any | [!] <addr>[/<mask>]) to (any | [!] <addr>[/<mask>]) port <a>[:<b>] -> <addr> port <c>[:*] [proto (tcp | udp | icmp)]
2001-07-06Allow negative match on interface name for nat and rdrChris Cappuccio
ok dhartmei@
2001-07-05&, not &&. Pointed out by dhartmei@.Hakan Olsson
2001-07-04cleanerTheo de Raadt
2001-07-04add new icmp codes and types as symbolic names, ok deraadtPeter Stromberg
2001-07-04do not pick a fightTheo de Raadt
2001-07-03Missed a few style fixes...Hakan Olsson
2001-07-03Document -q option. Some style fixes. dhartmei@ ok.Hakan Olsson
2001-07-03Add a -q (quiet) option. dhartmei@ ok.Hakan Olsson
2001-07-02Typo.Hakan Olsson
2001-07-01tag packets generated by pf (return-rst, return-icmp) so they are not ↵Daniel Hartmeier
filtered, use existing icmp_error() and ip_output(). ok dugsong@, frantzen@
2001-07-01Appeared in 3.0, not 2.9; openbsd@davidkrause.comAngelos D. Keromytis
2001-07-01Add port ranges to the rdr directive. Connections can be redirectedKjell Wooding
to either a range of the same size, or a single port. Redirects between ranges of different sizes are not supported. Eg: rdr dc0 10.0.0.0/24 port 60000:61000 -> 127.0.0.1 port 65530:* proto udp rdr xl0 0.0.0.0/0 port 6660:6669 -> 127.0.0.1 port 6667 proto tcp This replaces the wildcard port patch (when port = 0), as it should no longer be necessary. ok dhartmei@
2001-07-01Always print filter statistics, even when the filter is disabled.Kjell Wooding
2001-07-01Finish with posixifying command options. Now both "pfctl -Fs" andKjell Wooding
"pfctl -F states" work. Changed -[Fs]S to -[Fs] info (or -[Fs]i) based on an earlier conversation with theo. Added -[Fs] "all" to show or flush everything Fixup some man page pastos in the process
2001-06-29POSIX-ify the flag options at theo's requestKjell Wooding
2001-06-29change load_file implementation so we can accept input onKjell Wooding
stdin. Rewrite NAT processing loop to accomodate this fact (we can only read the rules file once). ok theo
2001-06-29fix counter/reason array usageDaniel Hartmeier
2001-06-28support scrub directive. somebody please please BNF yaccify this.Niels Provos
2001-06-28usage() was out of dateDaniel Hartmeier
2001-06-27Change flag syntaxKjell Wooding
-Fs, -Fn, -Fr, -FS to flush states, nat rules, filter rules, stats -ss, -sn, -sr, -sS to show them -z goes away
2001-06-27errx() doesn't return. use err() to get errno as well. translate two common ↵Daniel Hartmeier
errno. ok provos@
2001-06-27print inbound packets passed correctlyDaniel Hartmeier
2001-06-27Use bitfields for flag options in getopt.Kjell Wooding
2001-06-27add -z optionKjell Wooding
2001-06-27add -z flag for zeroing statistics. -s status no longer resets anythingKjell Wooding
2001-06-27state counter changesTheo de Raadt
2001-06-27make it understand protocol numbers, tooNiels Provos
2001-06-26Add -N (parse, but do not load) and -v (verbose: show parsed rules)Kjell Wooding
for pf and nat rules.
2001-06-26name comparison operatorsDug Song
2001-06-26Add -Wallsmart
2001-06-26int -> unsigned, so -Wall is happyDaniel Hartmeier
2001-06-26array of counters indexed by reason codesTheo de Raadt
2001-06-26bad smartNiels Provos
2001-06-26Add err.h for errx()smart
2001-06-26some warnx, and exit instead of returnNiels Provos
2001-06-26add rule nr for NielsDaniel Hartmeier
2001-06-26add rule pointer and log option to statesDaniel Hartmeier
2001-06-26Print statistics in a human readable format. ok dhartmeiKjell Wooding
2001-06-26Clarify what the -l option does.Kjell Wooding
2001-06-26use errx()Theo de Raadt
2001-06-26languageTheo de Raadt
2001-06-26change config file names to pf.conf and nat.confKjell Wooding
2001-06-26symbolic names for icmp-type and codes, ok deraadt@Peter Stromberg
2001-06-26Renamed files to pf.filter and pf.rulesIan Darwin