pf ruleset for imap

Vince jhary at unsane.co.uk
Mon Apr 18 03:54:18 PDT 2005


Do you use straight imap or imaps ?
I put both in but imap is 143 
Imaps is 993 

#IMAP and IMAPS
pass    in on $ext_if inet proto tcp \
         from any to ($ext_if) port { 143, 993 } flags S/SA keep state

Add it with the rest of your incoming rules.
 

> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org 
> [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of 
> Steven Bjørken Vang
> Sent: 18 April 2005 11:25
> To: questions at freebsd.org
> Subject: pf ruleset for imap
> 
> 
> hello.
> 
> just installed pf, everything is looking good.
> except my imap is blocked. what do i need to add, where?
> 
> #####  FreeBSD [i386]
> #####  my.hostname.com
> #####  City, Country
> 
> # pfctl -F a ; pfctl -Nf /etc/pf.conf ; pfctl -sr
> 
> int_if="ep0"
> ext_if="lnc0"
> 
> # *** Options
> #
> set     block-policy drop
> 
> # *** Scrub incoming packets
> #
> scrub   in all
> 
> # *** NAT
> #
> 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
> 
> # *** Default deny policy
> #
> block   drop log all
> 
> # *** Pass loopback traffic
> #
> pass    quick on lo0 all
> 
> # *** Outgoing
> #
> #
> pass    out on $ext_if inet proto tcp \
>         from any to any flags S/SA keep state
> pass    out on $ext_if inet proto { udp, icmp } \
>         from ($ext_if) to any keep state
> 
> # *** Bootstrap
> #
> pass    out on $ext_if inet proto udp \
>         from any port 68 to any port 67 keep state
> 
> # *** DNS and NTP
> #
> pass    out on $ext_if inet proto udp \
>         from ($ext_if) to any port { 53, 123 } keep state
> 
> # *** SSH and HTTP
> #
> pass    in on $ext_if inet proto tcp \
>         from any to ($ext_if) port { 22, 80 } flags S/SA keep state
> 
> # *** Active FTP
> #
> pass    in on $ext_if inet proto tcp \
>         from port 20 to ($ext_if) user proxy flags S/SA keep state
> 
> I guess that's it.
> Thanks all,
> 
> -- Steven
> 
> _______________________________________________
> 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