I found that on: https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy#BSDPF
Use the PF ruleset below as an example for FreeBSD and OpenBSD prior to 4.7.
your internal interface
int_if = "fxp0"
Tor's TransPort
trans_port = "9040"
set skip on lo
scrub in
rdr pass on $int_if inet proto tcp to !($int_if) -> 127.0.0.1 port $trans_port
rdr pass on $int_if inet proto udp to port domain -> 127.0.0.1 port domain
Use the PF ruleset below as an example for OpenBSD 4.7 and later.
your internal interface
int_if = "fxp0"
Tor's TransPort
trans_port = "9040"
set skip on lo
match in all scrub (no-df random-id)
pass in quick on $int_if inet proto tcp to !($int_if) rdr-to 127.0.0.1 port $trans_port
pass in quick on $int_if inet proto udp to port domain rdr-to 127.0.0.1 port domain
My question is first wich ruleset i need? Prior 4.7 or later 4.7
And how i can add this rule to Pfsenes?
Thanks