forked from rfxn/advanced-policy-firewall
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
156 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version: 9.7-2 | ||
version: 9.7-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
# | ||
# APF 9.7 [[email protected]] | ||
# APF 9.7-3 [[email protected]] | ||
### | ||
# Copyright (C) 2002-2011, R-fx Networks <[email protected]> | ||
# Copyright (C) 2011, Ryan MacDonald <[email protected]> | ||
|
@@ -20,13 +20,13 @@ | |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
### | ||
# | ||
VER="9.7" | ||
VER="9.7-3" | ||
CNF="/etc/apf/conf.apf" | ||
|
||
head() { | ||
echo "APF version $VER <apf@r-fx.org>" | ||
echo "Copyright (C) 2002-2011, R-fx Networks <proj@r-fx.org>" | ||
echo "Copyright (C) 2011, Ryan MacDonald <ryan@r-fx.org>" | ||
echo "Advanced Policy Firewall (APF) v$VER <apf@rfxn.org>" | ||
echo " Copyright (C) 2002-2012, R-fx Networks <proj@rfxn.org>" | ||
echo " Copyright (C) 2012, Ryan MacDonald <ryan@rfxn.org>" | ||
echo "This program may be freely redistributed under the terms of the GNU GPL" | ||
echo "" | ||
} | ||
|
@@ -148,7 +148,7 @@ if [ ! -f "$ALLOW_HOSTS" ]; then | |
touch $ALLOW_HOSTS | ||
chmod 600 $ALLOW_HOSTS | ||
fi | ||
# check devel mode | ||
# check dev mode | ||
devm | ||
# generate vnet rules | ||
$INSTALL_PATH/vnet/vnetgen | ||
|
@@ -190,6 +190,7 @@ case "$1" in | |
|
||
-r|--restart) | ||
$0 --flush | ||
sleep 2 | ||
$0 --start | ||
;; | ||
-a|--allow) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
## | ||
# deny_hosts | ||
# | ||
# Trust based rule file to define addresses that are implicitly denied. | ||
# Trust based rule file to define addresses that are denied traffic through the firewall. | ||
# | ||
# Format of this file is line-seperated addresses, IP masking is supported. | ||
# Example: | ||
# Format of this file is line-seperated FQDN/CIDR addresses. | ||
# Examples: | ||
# 192.168.2.1 | ||
# 192.168.5.0/24 | ||
# | ||
# advanced usage | ||
# domain.com | ||
# | ||
# The trust rules can be made in advanced format with 4 options | ||
# (proto:flow:port:ip); | ||
# 1) protocol: [packet protocol tcp/udp] | ||
# 2) flow in/out: [packet direction, inbound or outbound] | ||
# 3) s/d=port: [packet source or destination port] | ||
# 4) s/d=ip(/xx) [packet source or destination address, masking supported] | ||
# The trust system supports an advanced rule syntax to allow for more specific | ||
# trust rules to be created based on protocol, flow, port and address. | ||
# | ||
# Syntax: | ||
# proto:flow:[s/d]=port:[s/d]=ip(/mask) | ||
# s - source , d - destination , flow - packet flow in/out | ||
# The advanced syntax format is as follows: | ||
# protocol flow port address | ||
# tcp|udp|any in|out 1-65535 FQDN/CIDR address | ||
# | ||
# Protocol: ip protocl tcp, udp or any | ||
# Flow: traffic flow representing inbound (in) or outbound (out) communication | ||
# Port: network port (1-65535) that the communication will take place on | ||
# Address: network address that communication will take place to/from | ||
# | ||
# Examples: | ||
# inbound to destination port 22 from 192.168.2.1 | ||
# tcp:in:d=22:s=192.168.2.1 | ||
# tcp in 22 192.168.2.1 | ||
# | ||
# outbound to destination port 23 to destination host 192.168.2.1 | ||
# out:d=23:d=192.168.2.1 | ||
# tcp out 23 192.168.2.1 | ||
# | ||
# inbound to destination port 3306 from 192.168.5.0/24 | ||
# d=3306:s=192.168.5.0/24 | ||
# | ||
# tcp in 3306 192.168.5.0/24 | ||
## | ||
# | ||
# protocol flow port address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.