PF - Rewriting Just Destination Port

In iptables, you can rewrite a connection's destination port while preserving it's address (like so "REDIRECT --to-port X"). Is this not possible with PF? I've read and re-read about redirection in pf.conf(5), but it seems that the "rdr" directive requires you to rewrite the destination address, while only providing port preservation.

If possible, how can I get FP to rewrite just the port?
 
FreeBSoD said:
I've read and re-read about redirection in pf.conf(5), but it seems that the "rdr" directive requires you to rewrite the destination address, while only providing port preservation.
No, it can change the port too.

rdr The packet is redirected to another destination and possibly a different port.

However, you cannot "bounce" packets back out the same interface they came in on.

Redirections cannot reflect packets back through the interface they arrive on, they can only be redirected to hosts connected to different interfaces or to the firewall itself.
 
Back
Top