On Thu, Oct 8, 2009 at 7:03 AM, Jorge Enrique Valbuena Vargas <
[email protected]> wrote:

> Hi Andres,
>
>
> take a look at the examples at:
>
> http://www.openbsd.org/faq/pf/rdr.html
>
> Remember to use the *pass in *and *pass ou*t rules
>
> I use the rdr feature when i have a webserver on my DMZ. on port 8081 or
> whatever port you want
>
> Public IP = 1.2.3.4
> ext_if=rl0
> dmz_if=rl1
> webserver= 5.6.7.8
>
>
> rdr on $ext_if  proto tcp from any to any port 80 -> $webserver port 8081
>
> pass in  on  $ext_if inet proto tcp from any to $webserver port 8081
> pass in  oot  $dmz_if inet proto tcp from any to $webserver port 8081
>
>
> Here all traffic comes from internet and goes to your privatewebserver
>
> I hope this can help !
>
>
>
> On Wed, Oct 7, 2009 at 10:55 PM, Andres Salazar <[email protected]>wrote:
>
>> Dorian,
>>
>> Thank you. I take it for granted that "match" is for 4.6 . Thats fine.
>>
>> What is the difference passing it onto netcat, then doing it directly?
>>
>> Aside from this I also need to redirect a range of ports (1500-2000)..
>> and I think the issue would get more difficult if i do it with this
>> method..
>>
>> --Andres
>>
>> On Wed, Oct 7, 2009 at 6:38 PM, Dorian B|ttner <[email protected]>
>> wrote:
>> > Probably what you want might be something like this in pf.conf
>> > match in on $int_if proto tcp from any to ($ext_if) port www rdr-to
>> 127.0.0.1
>> > port 5000
>> > and in inetd.conf:
>> > 127.0.0.1:5000  stream  tcp     nowait  nobody  /usr/bin/nc     nc -w
>> 20
>> > my.internal.gateway.ip.here 80
>> >
>> > I believe this was somewhere in the pf faq, not exactly sure, you should
>> start
>> > inetd of course.
>> >
>> > If I'm right you wanna see what's your home hosted httpd doing on the
>> outside
>> > interface using your dyndns fqdn from internal network or similar.
>> Actually
>> > there's changes in pf so you might want to specify your version.
>> >
>> > Regards,
>> > Dorian

Reply via email to