Diese Beispielkonfiguration hat mir ein begeisteter Portblock-User geschickt.
Er steuert damit die Ports fr Direct Connect, mIRC und E-Mule, auerdem
werden alle Ports von auen geschlossen (ausser 8000, da luft der HTTPd).
Man kann von auen den HTTPd erreichen um den FTP-Server freizuschalten,
dieser wird zu jeder vollen Stunde wieder geblockt.

Inhalt der config/portblock.txt:

##-----------------------------------------------------------------------------
## portblock.txt - fli4l configuration parameters		          2.0.8
##
##        P L E A S E   R E A D   T H E   D O C U M E N T A T I O N
##
##        B I T T E  U N B E D I N G T   D I E   D O K U M E N T A T I O N
##                                  L E S E N 
##
## Creation:     25.04.2003  ds
## Last Update:  04.11.2003  ds - v2.0.2
##
## opt_portblock by Daniel Sokoll <fli4l@sirsocke.de>
##-----------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Optional package: portblock - open/close portgroups via webinteface (httpd)
#------------------------------------------------------------------------------

OPT_PORTBLOCK='yes'			#use portblock ['yes' / 'no']

PB_PORTRULE_N='13'		#Number of Ports / Portranges to block

PB_PORTRULE_1='ftp'		#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_1='tcp'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_1='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_2='21'		#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_2='udp'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_2='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_3='auth'		#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_3='tcp'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_3='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_4='113'		#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_4='udp'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_4='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_5='2112:2114'	#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_5='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_5='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_6='411:412'		#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_6='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_6='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_7='4661:4662'	#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_7='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_7='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_8='4672'		#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_8='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_8='both'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_9='1024:2111'	#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_9='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_9='in'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_10='2115:4660'	#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_10='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_10='in'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_11='4663:4671'	#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_11='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_11='in'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_12='4673:7999'	#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_12='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_12='in'		#Direction: ['in' / 'out' / 'both']

PB_PORTRULE_13='8001:65535'	#Port(s) / Service-Name (from /etc/services)
PB_PROTOCOL_13='both'		#Protocol: ['tcp' / 'udp' / 'both']
PB_DIRECTIO_13='in'		#Direction: ['in' / 'out' / 'both']


PB_GROUPCOUNT_N='6'		#Number of groups

PB_GROUP_NAME_1='FTP'		#Name of Portgroup shown in HTTPd
PB_GROUPRULES_1='1'		#Rules in this group (seperated with ';')
PB_BLOCK_AUTO_1='yes'		#block group automatically at boot?
PB_GROUP_USER_1='all'		#Show to user: [ 'N' / 'all' / 'none' ]

PB_GROUP_NAME_2='Direct Connect'#Name of Portgroup shown in HTTPd
PB_GROUPRULES_2='6'		#Rules in this group (seperated with ';')
PB_BLOCK_AUTO_2='yes'		#block group automatically at boot?
PB_GROUP_USER_2='1'		#Show to user: [ 'N' / 'all' / 'none' ]

PB_GROUP_NAME_3='mIRC'		#Name of Portgroup shown in HTTPd
PB_GROUPRULES_3='3-5'		#Rules in this group (seperated with ';')
PB_BLOCK_AUTO_3='yes'		#block group automatically at boot?
PB_GROUP_USER_3='1'		#Show to user: [ 'N' / 'all' / 'none' ]

PB_GROUP_NAME_4='emule'		#Name of Portgroup shown in HTTPd
PB_GROUPRULES_4='7;8'		#Rules in this group (seperated with ';')
PB_BLOCK_AUTO_4='yes'		#block group automatically at boot?
PB_GROUP_USER_4='1'		#Show to user: [ 'N' / 'all' / 'none' ]

PB_GROUP_NAME_5='21'		#Name of Portgroup shown in HTTPd
PB_GROUPRULES_5='2'		#Rules in this group (seperated with ';')
PB_BLOCK_AUTO_5='yes'		#block group automatically at boot?
PB_GROUP_USER_5='none'		#Show to user: [ 'N' / 'all' / 'none' ]

PB_GROUP_NAME_6='no input'	#Name of Portgroup shown in HTTPd
PB_GROUPRULES_6='9-13'		#Rules in this group (seperated with ';')
PB_BLOCK_AUTO_6='yes'		#block group automatically at boot?
PB_GROUP_USER_6='1'		#Show to user: [ 'N' / 'all' / 'none' ]


PB_BLOCKTYPE='DENY'		#Block groups using: REJECT or DENY

PB_NETWORK='192.168.6.0/24'	#Network to work with

PB_SHOW_DETAILS='yes'           #show group-details in httpd

PB_SWAP_BLOCK_COLORS='no'	#no:	green=closed / red=open
				#yes:	green=open / red=closed

PB_LANGUAGE='de'		#german / english [ 'de' / 'en' ]

PB_LOGGING='yes'			#Log PortBlock-Actions ['yes' / 'no']
PB_LOGUSER='1'				#Show to user: [ 'N' / 'all' / 'none' ]
PB_LOGFILE='/var/log/log.portblock'	#Use this File for logging


#------------------------------------------------------------------------------
# Optional package: pbscript - open/close portgroups via opt_easycron
#------------------------------------------------------------------------------

OPT_PBSCRIPT='yes'		#Install shellscript for use with e.g. easycron


#------------------------------------------------------------------------------
# Optional package: pbstatus - show status with OPTs CPANEL, COMLED, LPTLED ...
#------------------------------------------------------------------------------

OPT_PBSTATUS='yes'		#Install portblock-status-script

PBSTATUS_SCRIPT_OPEN='echo blink > /var/run/cpanel.status' #do if at least one group is open

PBSTATUS_SCRIPT_CLOSED='echo on > /var/run/cpanel.status'  #do if all groups are closed




Auszug aus config/base.txt Bereich Firewall:

FIREWALL_DENY_PORT_N='15'               	#no. of ports to reject/deny
FIREWALL_DENY_PORT_1='0:20		DENY'	#privileged ports: reject or deny
FIREWALL_DENY_PORT_2='22:112 		DENY'	#privileged ports: reject or deny
FIREWALL_DENY_PORT_3='114:410		DENY'	#privileged ports: reject or deny
FIREWALL_DENY_PORT_4='413:1023		DENY'	#privileged ports: reject or deny
FIREWALL_DENY_PORT_5='1080		DENY'	#SOCKS PROXY
FIREWALL_DENY_PORT_6='1243		DENY'	#trojan
FIREWALL_DENY_PORT_7='1999		DENY'	#trojan
FIREWALL_DENY_PORT_8='5000:5001		DENY'	#imond/telmond ports: reject or deny
FIREWALL_DENY_PORT_9='6776		DENY'	#trojan
FIREWALL_DENY_PORT_10='7789		DENY'	#trojan
FIREWALL_DENY_PORT_11='8080		DENY'	#WEB PROXY
FIREWALL_DENY_PORT_12='12345		DENY'	#trojan
FIREWALL_DENY_PORT_13='20012		DENY'	#vbox server access: reject or deny
FIREWALL_DENY_PORT_14='31337		DENY'	#trojan
FIREWALL_DENY_PORT_15='54320:54321 	DENY'	#trojan

FIREWALL_DENY_ICMP='yes'                 	#deny icmp (ping): yes or no
FIREWALL_LOG='yes'                       	#log access to rejected/denied ports






Auszug aus opt/etc/portfw.sh (fr die Portweiterleitungen):

#------------------------------------------------------------------------------
# example for Direct Connect (using ipautofw):
#------------------------------------------------------------------------------
/usr/sbin/ipmasqadm autofw -A -v -r udp  411  412 -h $hiddenhost1
/usr/sbin/ipmasqadm autofw -A -v -r tcp  411  412 -h $hiddenhost1

#------------------------------------------------------------------------------
# example for IRC (using ipautofw):
#------------------------------------------------------------------------------
/usr/sbin/ipmasqadm autofw -A -v -r tcp 2112 2114 -h $hiddenhost1
/usr/sbin/ipmasqadm autofw -A -v -r tcp 113 113   -h $hiddenhost1

#------------------------------------------------------------------------------
# example for emule (using ipautofw):
#------------------------------------------------------------------------------
/usr/sbin/ipmasqadm autofw -A -v -r tcp 4661 4662 -h $hiddenhost1
/usr/sbin/ipmasqadm autofw -A -v -r udp 4672 4672 -h $hiddenhost1






Die config/easycron.txt:

#-----------------------------------------------------------------------------
# easyEASYCRON.txt - fli4l configuration parameters 
#
#
# Creation:     08.11.2001  fm
# Last Update:  20.02.2003  ps
#
# Copyright (c) 2001 Stephan Manske <fli4l@stephan.manske-net.de>
#
# Uebernahme des OPT-Packetes am 20.02.2003 durch Peter Schiefer <lanspezi@lan4me.de>          
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#-----------------------------------------------------------------------------
#
#------------------------------------------------------------------------------
# Optional package: EASYCRON
#------------------------------------------------------------------------------
OPT_EASYCRON='yes'			# EASYCRON: yes or no
EASYCRON_NOMAIL='yes'			# EASYCRON: yes or no - Mail von cron unterdrcken
EASYCRON_N='1'				# EASYCRON: Anzahl
EASYCRON_1_CUSTOM=''			# EASYCRON: eigene Einstellungen wie Umgebungsvariablen
EASYCRON_1_COMMAND='/usr/local/bin/portblock.sh close 1'
EASYCRON_1_TIME='0 * * * *'		# EASYCRON: Zeitpunkt
EASYCRON_2_CUSTOM=''			# EASYCRON: eigene Einstellungen wie Umgebungsvariablen
EASYCRON_2_COMMAND='...'		# EASYCRON: auszufhrender Befehl
EASYCRON_2_TIME='*/2 * * * *'		# EASYCRON: Zeitpunkt: min h Tag Monat Wochentag
