Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch
Before you click on the following link, please check, whether the howto
package howto
, serie doc
is installed on your
local system. This link refers to a howto file in your local system.
Details about the topic "firewalling" are in Firewall-HOWTO
Here a short start/stop script. Replace the variable
MQ_LOCALNET
correspondingly. Please save the script as
/sbin/init.d/firewall
#! /bin/sh # Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved. # # Author: Bodo Bauer# # # # /sbin/init.d/firewall # IPFWADM="/sbin/ipfwadm" # local net MQ_LOCALNET="192.168.0.0/255.255.255.0" echo -n "Setting up firewall/masquerading " ## first of all close everything for i in -I -O -F; do # clear all rules ${IPFWADM} $i -f # make deny default ${IPFWADM} $i -p deny done case "$1" in start) echo "(start)" ${IPFWADM} -F -a accept -P all -S 0/0 -D ${MQ_LOCALNET} -b -m ;; stop) echo "(stop)" for i in -I -O -F; do # make accept default ${IPFWADM} $i -p accept done ;; *) echo "" echo "Usage: $0 {start|stop}" for i in -I -O -F; do # make accept default ${IPFWADM} $i -p accept done exit 1 esac ## NOTE: we mainly 'deny' per ports (see above), ## so, as we have now set up the rules correctly, ## open all filters for i in -I -O -F; do ${IPFWADM} $i -p accept done ## list the rules for i in -O -F -I; do ${IPFWADM} $i -ln done exit 0
Keywords: FIREWALL, IPFWADM, MASQUERADING, TCPIP, NETWORK, NET, SECURITY
Feedback welcome: Send Mail to kfr@suse.de (Please give the following subject: SDB-firewall
)
Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch