
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# This module should be placed under
# /etc/firewall/modules/public/port-forwarding.
# You'll also need the timbuktu-clients module to open the correct ports
# (in public/services)
#
# After installing the module, the user should execute rc.firewall with
# the --update-config parameter. The necessary options will be added to
# the configuration file.
#
#-----------------------------------------------------------------------
# CHANGES
#-----------------------------------------------------------------------
#
# 2001-03-13 Geoff Riley <geoffr@halcyoninternet.com>
#            Initial creation for v5.1
#
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#N# timbuktu
#A# forward
#T# host
#   |--------------------------------------------------------------------|
#D# timbuktu (Ports 1417:1420 TCP, 407 UDP)
#D#
#D# You can only enter a single LAN hostname/IP per option.
#D#
#D# Example:
#D#   forward-eth1-timbuktu-host = zaphod.localdomain
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------

tcp_port="1417:1420"
udp_port="407"

for host in `Option_Value forward $INTOPT timbuktu host`
do
	Forward_Hostports tcp "Timbuktu" $host $tcp_port
	Forward_Hostports udp "Timbuktu" $host $udp_port
done

unset tcp_port udp_port host

