pf pfffffft pfft *) problem

fbsd_user fbsd_user at a1poweruser.com
Mon Jun 13 03:07:07 GMT 2005



oif = "dc0"                 # oif is the macro name for the
                            # NIC facing the public internet
ob_state = "flags S/SA modulate state"     # outbound
ib_state = "flags S/SA synproxy state"     # inbound

# Allow out active FTP in responce to remote FTP client
pass out quick on $oif proto tcp from any port 20 to any $ob_state

# Allow out active FTP for gateway & LAN users
# If you want to use the pkg_add command to install application
packages
# on your gateway system you need this rule.
pass out quick on $oif proto tcp from any to any port 21 $ob_state

# Allow in active FTP from remote client
pass in quick on $oif proto tcp from any to any port 21 $ib_state

# Allow in responce to active FTP for gateway & LAN users
pass in quick on dc0 proto tcp from any port 20 to any $ib_state







-----Original Message-----
From: owner-freebsd-questions at freebsd.org
[mailto:owner-freebsd-questions at freebsd.org]On Behalf Of Fafa Hafiz
Krantz
Sent: Friday, June 10, 2005 5:23 PM
To: questions at freebsd.org
Subject: pf pfffffft pfft *) problem



hey!

pf blocks me from ftp'ing out from my workstation (behind my pf box)
and i don't know why.
it only blocks, however, the ftp's i've been downloading a lot from
during the past few days.
ftp'ing out *from* my pf box works just nicely.

some of my users report not being able to ssh in, too.

# tcpdump -n -e -ttt -i pflog0
#
24. 001750 rule 0/0(match): block in on rl0: IP 217.31.174.134:2200
> 213.187.181.23 : FP 0:34(34) ack 1 win 5840

heeeeeeelp! :D

i didn't change my working configuration.
it's been working for months. until now ...

# cat /etc/pf.conf
#
int_if="ep0"
ext_if="rl0"

set     block-policy drop
scrub   in all

nat     on $ext_if from $int_if:network to any -> ($ext_if)
rdr     on $int_if proto tcp from any to any \
        port 21 -> 127.0.0.1 port 8021

block   drop log all
pass    quick on { lo0 $int_if }

pass    out on $ext_if inet proto { tcp, udp, icmp } \
        from any to any keep state

pass    in on $ext_if inet proto { tcp, udp } \
        from any to ($ext_if) port 53
pass    out on $ext_if inet proto { tcp, udp } \
        from any port 53 to any

pass    out on $ext_if inet proto udp \
        from any to any port 123 keep state

pass    in on $ext_if inet proto tcp \
        from any to ($ext_if) port { 22, 25, 80, 110, 113, 143 } \
        flags S/SA keep state

pass    in on $ext_if inet proto tcp \
        from any port 20 to ($ext_if) user proxy flags S/SA keep
state

pass    in on $ext_if proto tcp \
        from any to any port 31337 keep state
pass    in on $ext_if proto tcp \
        from any to any port 53333:55555

--

Fafa Hafiz Krantz
  Research Designer @ http://www.home.no/barbershop
  Enlightened @ http://www.home.no/barbershop/smart/sharon.pdf


--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

_______________________________________________
freebsd-questions at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list