Hi all, I searched the FAQ and the howto and still can not find answer to this question: I am using ipfilter on a gateway to NAT a home LAN. I set up the rules so that I can make tcp connections to the outside world on any of the computers in the LAN:
pass out quick on xl0 proto tcp/udp from 192.168.1.0/24 to any keep state
Fair enough. But this does not allow traffic to the outside on the gateway itself, whose IP address on the outter interface is obtained via DHCP from the ISP. Unfortunately, I sometimes need to do so to install programs in the port (it's a FreeBSD box). Since the IP address is dynamic, how can I write such a rule?
just remove the from 192.xxxxx in your rule. This will allow all outgoing packets (outgoing on xl0) without regard to the source IP address. If your LAN has other addresses (say 10.xxx) that you don't want to see talking to outside, just add rules on the internal interface.
