#--------------------------------------------------------------------
# Do 'normal' IP address translation. This line will take all packets
# going out on your external NIC (bge0) that have a source address coming
# from your internal network (192.168.1.0), and translate it to whatever
# IP address your external NIC happens to have at that time
#--------------------------------------------------------------------
# FTP
# 28.5.21.1 IPNAT Rules
# This rule will handle all the traffic for the internal LAN:
map bge0 192.168.1.0/24 -> 0.0.0.0/32
#
# This rule handles the FTP traffic from the gateway:
map bge0 0.0.0.0/0 -> 0.0.0.0/32 proxy port 21 ftp/tcp
#
# This rule handles all non-FTP traffic from the internal LAN:
#map bge0 192.168.1.0/24 -> 0.0.0.0/32
#
# Additionally we can make things even easier by using the auto keyword to tell IPNAT to
# determine by itself which ports are available to use:
map bge0 192.168.1.0/24 -> 0.0.0.0/32 portmap tcp/udp auto
#--------------------------------------------------------------------
# If you have a system on your internal network that needs to be
# 'reachable' by external systems on the internet, you'll need a rule
# similar to the one below. This one takes all inbound http traffic
# (TCP port 80) that hits the firewall's external interface (rl0) and
# redirects it to port 80 on the 192.168.1.50 system on the internal network.
# Simply uncomment the rule, change the IP address and port number so that
# it does what you need. Remember that you have to enable the corresponding
# inbound filter in your /etc/ipf.rules file, too.
#--------------------------------------------------------------------
# rdr rl0 0.0.0.0/0 port 80 -> 192.168.1.50 port 80 tcp
# Redireccion para el Squid
# Inseguro www (80)
rdr bge1 0.0.0.0/0 port 80 -> 127.0.0.1 port 3128 tcp
# Redireccion para el aMule (Incoming: 4662 TCP, 4665 y 4672 UDP, 4711 TCP y 65535 UDP)
rdr bge0 0.0.0.0/0 port 4662 -> 192.168.7.100 port 4662 tcp
rdr bge0 0.0.0.0/0 port 4711 -> 192.168.7.100 port 4711 tcp
rdr bge0 0.0.0.0/0 port 4665 -> 192.168.7.100 port 4665 udp
rdr bge0 0.0.0.0/0 port 4672 -> 192.168.7.100 port 4672 udp
rdr bge0 0.0.0.0/0 port 65535 -> 192.168.7.100 port 65535 udp
# Redireccion para el Azureus (advanced)
rdr bge0 0.0.0.0/0 port 38789 -> 192.168.7.100 port 38789 tcp
rdr bge0 0.0.0.0/0 port 38789 -> 192.168.7.100 port 38789 udp
rdr bge0 0.0.0.0/0 port 38790 -> 192.168.7.100 port 38790 tcp
rdr bge0 0.0.0.0/0 port 38790 -> 192.168.7.100 port 38790 udp
rdr bge0 0.0.0.0/0 port 6969 -> 192.168.7.100 port 6969 udp
# Redireccion para el BitTorrent
# TCP/UDP 6881, 6882, 6883, 6884, 6885, 6886, 6887, 6889, 6890
rdr bge0 0.0.0.0/0 port 6881 -> 192.168.7.100 port 6881 tcp/udp
rdr bge0 0.0.0.0/0 port 6882 -> 192.168.7.100 port 6882 tcp/udp
rdr bge0 0.0.0.0/0 port 6883 -> 192.168.7.100 port 6883 tcp/udp
rdr bge0 0.0.0.0/0 port 6884 -> 192.168.7.100 port 6884 tcp/udp
rdr bge0 0.0.0.0/0 port 6885 -> 192.168.7.100 port 6885 tcp/udp
rdr bge0 0.0.0.0/0 port 6886 -> 192.168.7.100 port 6886 tcp/udp
rdr bge0 0.0.0.0/0 port 6887 -> 192.168.7.100 port 6887 tcp/udp
rdr bge0 0.0.0.0/0 port 6888 -> 192.168.7.100 port 6888 tcp/udp
rdr bge0 0.0.0.0/0 port 6889 -> 192.168.7.100 port 6889 tcp/udp
rdr bge0 0.0.0.0/0 port 6890 -> 192.168.7.100 port 6890 tcp/udp
# Redireccion a la UPS Alpha (master)
rdr bge0 0.0.0.0/0 port 81 -> 192.168.1.252 port 80 tcp
# Redireccion a la UPS Minute Man (cuarto electrico)
rdr bge0 0.0.0.0/0 port 82 -> 192.168.1.250 port 82 tcp
# Redireccion a las Camaras Video
rdr bge0 0.0.0.0/0 port 83 -> 192.168.1.220 port 554 tcp
# Redireccion a la Impresora Kyocera FS-1920
#rdr bge0 0.0.0.0/0 port 84 -> 192.168.1.211 port 80 tcp
# Redireccion a la Impresora Kyocera FS-2000d
rdr bge0 0.0.0.0/0 port 85 -> 192.168.1.212 port 80 tcp
# Redireccion a la Impresora Dell 5100cn (Contabilidad)
#rdr bge0 0.0.0.0/0 port 86 -> 192.168.1.209 port 80 tcp
# Redireccion a la Impresora Dell 5100cn2 (Graficacion)
#rdr bge0 0.0.0.0/0 port 87 -> 192.168.1.210 port 80 tcp
# Redireccion a equipo en la red VNC 5901 tcp (Natalia)
#rdr bge0 0.0.0.0/0 port 5901 -> 192.168.1.86 port 5900 tcp