tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
NPF and Destination NAT
Hi tech-net,
I have been recently exploring possibilities of integrating NPF with some
third party proxies. 3 proxy, for instance, accepts connections on
its listening address and port so obviously we will need to NAT our packet it
whatever address and port it is listening on and then expose an ioctl to give them
back the destination address associated with that NAT connection.
(This is what is currently done in PF).
In my experinmentations, and further code inspections, I realized NPF DNAT (<-) is strictly bound to
incoming packet and SNAT (->) to outgoing packet.
I had a simple rule setup and realized when you do.
map wm0 dynamic 192.168.64.1 <- 192.168.64.3
group “ext” on wm0 {
Pass out final stateful all.
}
if your outgoing traffic has destination address 192.168.64.3, it
doesn’t NAT it because it is not an incoming packet.
should this be made a bit flexible ? maybe allowing source address NAT possible
on incoming traffic and also destination address NAT on outgoing too.
Home |
Main Index |
Thread Index |
Old Index