Реклама: |
Since you're installing a firewall, you may have decided that it is prudent to use a
proxy for many of your outgoing connections so that you can further tighten your filter
rules protecting your internal network, or you may have run into a situation that the NAT
mapping process does not currently handle properly. This can also be accomplished with a
redirection statement:
rdr xl0 0.0.0.0/0 port 21 -> 127.0.0.1 port 21
This statement says that any packet coming in on the xl0 interface destined
for any address (0.0.0.0/0) on the ftp port should be rewritten to connect it with a proxy
that is running on the NAT system on port 21.
This specific example of FTP proxying does lead to some complications when used with
web browsers or other automatic-login type clients that are unaware of the requirements of
communicating with the proxy. There are patches for TIS Firewall Toolkit'sftp-gw
to mate it with the nat process so that it can determine where you were trying to go and
automatically send you there. Many proxy packages now work in a transparent proxy
environment (Squid for example, located at http://squid.nlanr.net, works fine.)
This application of the rdr keyword is often more useful when you wish to
force users to authenticate themselves with the proxy. (For example, you desire your
engineers to be able to surf the web, but you would rather not have your call-center staff
doing so.)