
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# This module should be placed under
# /etc/firewall/modules/public/port-forwarding.
# You'll also need the pcanywhere-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-02-05  Edwin ten Brink <edwin@privateer.student.utwente.nl>
#             Initial creation for v5.1
#
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#N# pcanywhere
#A# forward
#T# host
#   |--------------------------------------------------------------------|
#D# pcanywhere (Ports 5631 TCP, 5632 UDP)
#D#
#D# You can only enter a single LAN hostname/IP per option.
#D#
#D# Example:
#D#   forward-eth1-pcanywhere-host = zaphod.localdomain
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------

tcp_port="5631"
udp_port="5632"

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

unset tcp_port udp_port host

