Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to properly setup the firewall on my gateway (OpenBSD 4.7) using pf to allow amule (on 10.0.0.104) to operate properly as discussed here:

Now I know pf has changed a bit from OpenBSD 4.7 to 4.9 with some of the rules being rewritten and I believe the '->' symbol is no longer used with port forwarding. So my question is:

Which rule set do I use for pf on OpenBSD 4.7 on the gateway? This:

# pass in on $int_if proto tcp from any to any port 4662 rdr-to 10.0.0.104
# pass in on $int_if proto udp from any to any port 4672 rdr-to 10.0.0.104
# pass in on $int_if proto udp from any to any port 4665 rdr-to 10.0.0.104

or this:

# rdr pass on egress proto tcp to port 4662 -> 10.0.0.104
# rdr pass on egress proto udp to port 4672 -> 10.0.0.104
# rdr pass on egress proto udp to port 4665 -> 10.0.0.104

The OBSD site has updated everything to reflect 4.9 now and no longer seems to have the old pf stuff up there.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You want the first set. Regarding the OpenBSD documentation you can consult the man page for the most accurate info, if you don't have them installed you can get them from OpenBSDs site:

http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf&apropos=0&sektion=0&manpath=OpenBSD+4.7&arch=amd64&format=html

They keep all versions and there is a drop down that lets you select the specific one you are using.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.