]>
git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - config/forwardfw/firewall-policy
e142f2d3f44fc998aeca9eb50fb627b382f2ab81
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
-i orange0
! -o $IFACE -j DROP
34 /sbin
/iptables
-A POLICYFWD
-j ACCEPT
35 /sbin
/iptables
-A POLICYFWD
-m comment
--comment "DROP_FORWARD" -j DROP
39 if [ "$POLICY1" == "MODE1" ]; then
40 if [ "$FWPOLICY1" == "REJECT" ]; then
41 if [ "$DROPOUTGOING" == "on" ]; then
42 /sbin
/iptables
-A POLICYOUT
-m limit
--limit 10/minute
-j LOG
--log-prefix "REJECT_OUTPUT"
44 /sbin
/iptables
-A POLICYOUT
-j REJECT
--reject-with icmp-host-unreachable
-m comment
--comment "DROP_OUTPUT"
46 if [ "$FWPOLICY1" == "DROP" ]; then
47 if [ "$DROPOUTGOING" == "on" ]; then
48 /sbin
/iptables
-A POLICYOUT
-m limit
--limit 10/minute
-j LOG
--log-prefix "DROP_OUTPUT"
50 /sbin
/iptables
-A POLICYOUT
-j DROP
-m comment
--comment "DROP_OUTPUT"
53 /sbin
/iptables
-A POLICYOUT
-j ACCEPT
54 /sbin
/iptables
-A POLICYOUT
-m comment
--comment "DROP_OUTPUT" -j DROP
57 if [ "$FWPOLICY2" == "REJECT" ]; then
58 if [ "$DROPINPUT" == "on" ]; then
59 /sbin
/iptables
-A POLICYIN
-m limit
--limit 10/minute
-j LOG
--log-prefix "REJECT_INPUT"
61 /sbin
/iptables
-A POLICYIN
-j REJECT
--reject-with icmp-host-unreachable
-m comment
--comment "DROP_INPUT"
63 if [ "$FWPOLICY2" == "DROP" ]; then
64 if [ "$DROPINPUT" == "on" ]; then
65 /sbin
/iptables
-A POLICYIN
-m limit
--limit 10/minute
-j LOG
--log-prefix "DROP_INPUT"
67 /sbin
/iptables
-A POLICYIN
-j DROP
-m comment
--comment "DROP_INPUT"