On Sat, 09 Dec 2006 14:34:04 +0100, Mitja wrote: >Mikael Fridh wrote: >>> # pfctl -s all >>> TRANSLATION RULES: >>> nat on bge0 inet from 192.168.1.0/24 to any -> (bge0:0) >>> rdr pass on em1 inet proto tcp from any to any port = 5900 -> >>> 192.168.1.111 port 5900 >> >> If bge0 is your external interface that nat line now looks correct. >> If your internal hosts on the 192.168.1.0/24 net have default gateway >> 192.168.1.1 it should be nating properly. > >Yes and it is nating, but I am trying to set my source IP to >193.189.180.193 (em1). > Translating a bit from what I use should get you there:
lan_ip="192.168.1.0/24" ext_if="bge0" fw_global-ip="193.189.180.193" nat on $ext_if inet from $lan_ip to any -> $fw_global_ip I discovered this by (1) needing it, and (2) reading man 5 pf.conf and checking the BNF grammar near the end, and (3) trying it. It saved me from half-bridging (messy) or renting a /32 (waste of $$). Without the quality of OpenBSD docs it may never have happened. >From the land "down under": Australia. Do we look <umop apisdn> from up over?