[talk] Pf rule

Steven Kreuzer skreuzer at exit2shell.com
Wed May 11 19:13:01 EDT 2016

> On May 11, 2016, at 6:49 PM, Mark Saad <mark.saad at ymail.com> wrote:
> All
>  Does anyone know how to create a rule that acts as a simple port forward . For example inbound  traffic on and I want to send it to . I suspect pf will not let me do this but I am unsure.

pf supports traffic redirection with 'rdr'. Check out http://www.openbsd.org/faq/pf/rdr.html <http://www.openbsd.org/faq/pf/rdr.html> for all the details but  an example rule which will redirect all IPs in the redirect table that connect to port 22 on igb0 to port 2222 looks something like this

rdr pass inet proto tcp from <redirect> to igb0 port 22 -> port 2222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20160511/89e081e9/attachment.html>

More information about the talk mailing list