#
# Macros: User-defined variables that can hold IP addresses, interface
names, etc.
#
ext_if ="em0"
int_if ="em1"
wifi_if="ral0"
# For Bittorrent
PORT="44049"
torrent_ip1="192.168.0.101"
# Publicly Accessible Services
pubserv="{ 22 }"
# internal network
lan_net = "{ 192.168.0.0/24, 192.168.1.0/24 }"
#
# Tables: A structure used to hold lists of IP addresses.
#
#
# Options: Various options to control how PF works.
#
set skip on lo
#
# Scrub: Reprocessing packets to normalize and defragment them.
#
scrub in all
#
# Queueing: Provides bandwidth control and packet prioritization.
#
#
# Translation: Controls Network Address Translation and packet redirection.
#
nat on $ext_if from $lan_net to any -> ($ext_if)
#Bittorrent Rules
rdr on $ext_if proto tcp from any to ($ext_if) port $PORT ->
$torrent_ip1 port $PORT
pass in quick on $ext_if proto tcp from any to $torrent_ip1 port $PORT
#
# Filter Rules: Allows the selective filtering or blocking of packets as
they pass through any of the interfaces.
#
#default deny policy
block in all
#antispoofing
block in quick from urpf-failed
#Don't bother the locals
pass in on {$int_if $wifi_if} from $lan_net to any
pass out on {$int_if $wifi_if} from any to $lan_net
# pass tcp, udp, and icmp out on the external (Internet) interface.
# tcp connections will be modulated, udp/icmp will be tracked
# statefully.
pass out on $ext_if proto { tcp udp icmp } all modulate state
OMG OMG, I am upgrading to 4.3-current when I get home!!!! That is
very very awesome. Thanks for the info.This also means I don't have to
use ipsec vpn solution. :)
Thanks,
Jonathan