block all
pass in on fxp0 proto tcp from any to any port 22 flags S/SA
pass out on fxp0 proto tcp from any to any port 22 flags S/SA
Por favor, considere que você tem que alterar fxp0
para o seu ethernet de acordo com o seu sistema operacional.
Reverso do acima:
pass in on fxp0 proto tcp from any to any port < 22 flags S/SA
pass out on fxp0 proto tcp from any to any port < 22 flags S/SA
pass in on fxp0 proto tcp from any to any port > 22 flags S/SA
pass out on fxp0 proto tcp from any to any port > 22 flags S/SA
block in on fxp0 proto tcp from any to any port 22
block out on fxp0 proto tcp from any to any port 22