]>
git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - config/forwardfw/firewall-policy
9af835cc9cc92261f6333572a1ad855a7bf4f9d3
3 eval $
(/usr
/local
/bin
/readhash
/var
/ipfire
/forward
/settings
)
4 eval $
(/usr
/local
/bin
/readhash
/var
/ipfire
/optionsfw
/settings
)
5 eval $
(/usr
/local
/bin
/readhash
/var
/ipfire
/ethernet
/settings
)
11 if [ -f "/var/ipfire/red/iface" ]; then
12 IFACE
=`cat /var/ipfire/red/iface`
16 if [ "$POLICY" == "MODE1" ]; then
17 if [ "$FWPOLICY" == "REJECT" ]; then
18 if [ "$DROPFORWARD" == "on" ]; then
19 /sbin
/iptables
-A POLICYFWD
-m limit
--limit 10/minute
-j LOG
--log-prefix "REJECT_FORWARD"
21 /sbin
/iptables
-A POLICYFWD
-j REJECT
--reject-with icmp-host-unreachable
-m comment
--comment "DROP_FORWARD"
23 if [ "$FWPOLICY" == "DROP" ]; then
24 if [ "$DROPFORWARD" == "on" ]; then
25 /sbin
/iptables
-A POLICYFWD
-m limit
--limit 10/minute
-j LOG
--log-prefix "DROP_FORWARD"
27 /sbin
/iptables
-A POLICYFWD
-j DROP
-m comment
--comment "DROP_FORWARD"
30 if [ "$BLUE_DEV" ] && [ "$IFACE" ]; then
31 /sbin
/iptables
-A POLICYFWD
-i blue0
! -o $IFACE -j DROP
33 /sbin
/iptables
-A POLICYFWD
-j ACCEPT
37 if [ "$POLICY1" == "MODE1" ]; then
38 if [ "$FWPOLICY1" == "REJECT" ]; then
39 if [ "$DROPOUTGOING" == "on" ]; then
40 /sbin
/iptables
-A POLICYOUT
-m limit
--limit 10/minute
-j LOG
--log-prefix "REJECT_OUTPUT"
42 /sbin
/iptables
-A POLICYOUT
-j REJECT
--reject-with icmp-host-unreachable
-m comment
--comment "DROP_OUTPUT"
44 if [ "$FWPOLICY1" == "DROP" ]; then
45 if [ "$DROPOUTGOING" == "on" ]; then
46 /sbin
/iptables
-A POLICYOUT
-m limit
--limit 10/minute
-j LOG
--log-prefix "DROP_OUTPUT"
48 /sbin
/iptables
-A POLICYOUT
-j DROP
-m comment
--comment "DROP_OUTPUT"
51 /sbin
/iptables
-A POLICYOUT
-j ACCEPT
54 if [ "$FWPOLICY2" == "REJECT" ]; then
55 if [ "$DROPINPUT" == "on" ]; then
56 /sbin
/iptables
-A POLICYIN
-m limit
--limit 10/minute
-j LOG
--log-prefix "REJECT_INPUT"
58 /sbin
/iptables
-A POLICYIN
-j REJECT
--reject-with icmp-host-unreachable
-m comment
--comment "DROP_INPUT"
60 if [ "$FWPOLICY2" == "DROP" ]; then
61 if [ "$DROPINPUT" == "on" ]; then
62 /sbin
/iptables
-A POLICYIN
-m limit
--limit 10/minute
-j LOG
--log-prefix "DROP_INPUT"
64 /sbin
/iptables
-A POLICYIN
-j DROP
-m comment
--comment "DROP_INPUT"