I have the following in my pf.conf, all works nice so far, except FTP, what do I need to add to this to get FTP working?
I tried many things already, but am getting nowhere because apparently I am doing stuff wrong in the order of things.
I tried many things already, but am getting nowhere because apparently I am doing stuff wrong in the order of things.
Code:
# ----------------------- simple server pf.conf ----------------------
# For FreeBSD 9.1
# j65nko 2011, 2012, 2013
#
# If you adapt this ruleset for a resolving caching name server please
# make sure you don't allow the whole world to use your name server
# Creating an open resolving name server can allow the bad guys to use your nameserver
# in an DNS amplification attack
ext_if="vtnet0"
icmp_types="echoreq"
# Custom port for ssh
SSH_CUSTOM = xxxx
scrub in on $ext_if all fragment reassemble
set skip on lo0
#set skip on lo1
antispoof for $ext_if
# --- EXTERNAL INTERFACE
# --- INCOMING -------------------------------------------------------------------
# --- TCP
pass in quick on $ext_if inet proto tcp from any to $ext_if port http
pass in quick on $ext_if inet proto tcp from any to $ext_if port https
pass in quick on $ext_if inet proto tcp from xx.xx.xx.xx to $ext_if port $SSH_CUSTOM
pass in quick on $ext_if inet proto tcp from any to $ext_if port smtp
pass in quick on $ext_if inet proto tcp from xx.xx.xx.xx to $ext_if port pop3
pass in quick on $ext_if inet proto tcp from xx.xx.xx.xx to $ext_if port 2222
# --- for authoritative DNS server
#pass in quick on $ext_if inet proto udp from any to $ext_if port domain
# --- UDP
# --- for authoritative DNS server
#pass in quick on $ext_if inet proto udp from any to $ext_if port domain
# --- ICMP
pass in quick on $ext_if inet proto icmp from any to $ext_if icmp-type $icmp_types
# --- EXTERNAL INTERFACE
# --- OUTGOING --------------------------------------------------------------------
anchor TMP
# --- TCP
pass out quick log on $ext_if inet proto tcp from $ext_if to any port smtp
pass out quick on $ext_if inet proto tcp from $ext_if to any port domain
pass out quick on $ext_if inet proto tcp from $ext_if to any port http
pass out quick on $ext_if inet proto tcp from $ext_if to any port https
pass out quick on $ext_if inet proto tcp from $ext_if to any port whois
pass out quick on $ext_if inet proto tcp from $ext_if to xx.xx.xx.xx port $SSH_CUSTOM
pass out quick on $ext_if inet proto tcp from $ext_if to any port smtp
pass out quick on $ext_if inet proto tcp from $ext_if to xx.xx.xx.xx port pop3
pass out quick on $ext_if inet proto tcp from $ext_if to xx.xx.xx.xx port 2222
# --- UDP
pass out quick on $ext_if inet proto udp from $ext_if to any port domain
pass out quick on $ext_if inet proto udp from $ext_if to any port ntp
# --- ICMP
pass out quick on $ext_if inet proto icmp from $ext_if to any
# ------------------------------------------------------
# --- DEFAULT POLICY
# ------------------------------------------------------
block log all
# ----- end of pf.conf