
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# This module should be placed under
# /etc/firewall/modules/public/port-forwarding.
# You'll also need the afp-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.
#
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#N# afp
#A# forward
#T# host
#   |--------------------------------------------------------------------|
#D# afp (Ports 548 TCP, 548 UDP)
#D#
#D# You can only enter a single LAN hostname/IP per option.
#D#
#D# Example:
#D#   forward-eth1-afp-host = newton.localdomain
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------

tcp_port="548"
udp_port="548"

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

unset tcp_port udp_port host

