Thanks for the reply David.

Specifically, I use WinMX on multiple hosts behind the firewall. I want the firewall to see the first packet from a host (TCP 7719) and then open UDP 6657 and TCP 6699 (inbound from the internet) for that host. I do not want to statically assign these open ports to one host address, but rather make this dynamic. After a period of inactivity, the ports would then be closed allowing another host to "trigger" this rule.

David S. wrote:
I am unclear how to setup IPF to open ports once a private host sends the first packet. I would like to have this rule dynamic so that any host (one at a time of course) can use an application. I don't want these ports open all the time. Only when needed. In router gateway speak, how does one configure port triggering?

Hmm ... I'm not familiar with the term "port triggering" here, but I gather that, practically, it means the same thing as "state-ful
packet filtering", which is just what IPF does. For example, a rule
like

pass in quick on fxp0 proto tcp from 1.2.3.4 to any port = 80 \
flags S keep state

would allow the first SYN packet of an HTTP connection from host
'1.2.3.4' through, and establish a state for that connection in the
filter, so that subsequent packets in the session get through automatically, until one side or the other closes the connection.
As the state kept in the filter is specific TCP connection, no
other host would be able to exploit that state and get through to
the HTTP port, unless it were also allowed through a rule like the
above.

See the IPF How-to, especially the section "Implicit Allow; The "keep state" Rule" (http://www.obfuscation.org/ipf/ipf-howto.html#TOC_20)
for a better explanation of this.
David S.





Reply via email to