View Single Post
  #2   (View Single Post)  
Old 6th August 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

The answer you seek, including an example, are found right within the PF User's Guide, which is an adjunct document of the OpenBSD FAQ.

Quote:
When specifying an interface name for the translation address as above, the IP address is determined at pf.conf load time, not on the fly. If you are using DHCP to configure your external interface, this can be a problem. If your assigned IP address changes, NAT will continue translating outgoing packets using the old IP address. This will cause outgoing connections to stop functioning. To get around this, you can tell PF to automatically update the translation address by putting parentheses around the interface name:
pass out on tl0 from dc0:network to any nat-to (tl0)
See the complete chapter from the PF User's Guide on Network Address Translation if you need more information.
Reply With Quote