Hi all,
I have my FTP server behind a FreeBSD firewall. I am using ipfilters.
However, I cannot sucessfully redirect the FTP request (but I can
sucessfully redirect all the request to inn). Is there any
configuration errors in my files?
Here is portion of my ipf.rules:
---------------------------- Begin
--------------------------------------------
#################################################################
# Outside Interface
#################################################################
#----------------------------------------------------------------
# Allow out all TCP, UDP, and ICMP traffic & keep state on it
# so that it's allowed back in.
#----------------------------------------------------------------
pass out quick on tun0 proto tcp from any to any keep state
pass out quick on tun0 proto udp from any to any keep state
pass out quick on tun0 proto icmp from any to any keep state
block out quick on tun0 all
# allow SSH
pass in quick on tun0 proto tcp from any to any port = 22 keep state
# allow NNTP
pass in quick on tun0 proto tcp from any to any port = 11999 keep
state
pass in quick on tun0 proto tcp from any to 192.168.0.4/32 port = 119
flags S keep state keep frags
# allow FTP
pass in quick on tun0 proto tcp from any to any port = 2100 keep state
pass in quick on tun0 proto tcp from any to 192.168.0.4/32 port = 21
flags S keep state keep frags
pass in quick on tun0 proto tcp from any to any port = 2099 keep state
pass in quick on tun0 proto tcp from any to 192.168.0.4/32 port = 20
flags S keep state keep frags
# Block all the port default
block in on tun0 all
---------------------------- End
--------------------------------------------
Here is my ipnat.rules
---------------------------- Begin
--------------------------------------------
rdr tun0 0.0.0.0/0 port 11999 -> 192.168.0.4 port 119 tcp
rdr tun0 0.0.0.0/0 port 2100 -> 192.168.0.4 port 21 tcp
rdr tun0 0.0.0.0/0 port 2099 -> 192.168.0.4 port 20 tcp
#map tun0 192.168.0.0/24 -> 0/32 proxy port ftp ftp/tcp
map tun0 192.168.0.0/24 -> 0/32
---------------------------- End
--------------------------------------------