I am currently using ipchains with RedHat 6.0 to allow machines behind
the firewall to access the internet. the rc.firewall script that i
used is shown below. i have an ftp server running on port 21 on the
firewall machine and would also like to have access to the ftp server
on one of the maches behind the firewall. How can I do this using
ipchains? is it possible?
Thanks, JP
#! /bin/sh
# rc.firewall - Initial SIMPLE IP Masquerade test for 2.1.x and 2.2.x
kernels using IPCHAINS
#
# Load all required IP MASQ modules
#
# NOTE: Only load the IP MASQ modules you need. All current IP
MASQ modules
# are shown below but are commented out from loading.
# Needed to initially load modules
#
/sbin/depmod -a
# Supports the proper masquerading of FTP file transfers using the
PORT method
#
/sbin/modprobe ip_masq_ftp
# Supports the masquerading of RealAudio over UDP. Without this
module,
# RealAudio WILL function but in TCP mode. This can cause a
reduction
# in sound quality
#
/sbin/modprobe ip_masq_raudio
#CRITICAL: Enable IP forwarding since it is disabled by default since
#
# Redhat Users: you may try changing the options in
/etc/sysconfig/network from:
#
# FORWARD_IPV4=false
# to
# FORWARD_IPV4=true
#
echo "1" > /proc/sys/net/ipv4/ip_forward
# MASQ timeouts
#
# 2 hrs timeout for TCP session timeouts
# 10 sec timeout for traffic after the TCP/IP "FIN" packet is
received
# 160 sec timeout for UDP traffic (Important for MASQ'ed ICQ users)
#
/sbin/ipchains -M -S 7200 10 160
# Enable simple IP forwarding and Masquerading
#
# NOTE: The following is an example for an internal LAN address in
the 192.168.0.x
# network with a 255.255.255.0 or a "24" bit subnet mask.
#
# Please change this network number and subnet mask to match
your internal LAN setup
#
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -s 10.1.1.0/24 -j MASQ