Hi!

I've been using OpenBSD 3.3 release with great success to do redirection
from external and internal IPs to internal IPs. I've been using TCP proxying
as noted in the FAQ.

i.e.

/etc/inetd.conf
127.0.0.1:5000 stream tcp nowait nobody /usr/bin/nc nc -w 20 192.168.1.2 80

/etc/pf.conf
rdr on $ext_if proto tcp from any      to any     port 80 -> $WWW_IP port 80
rdr on $int_if proto tcp from $int_net to $ext_if port 80 -> 127.0.0.1 port
5000
pass in  log on $ext_if inet proto tcp from any to $WWW_IP port 80 keep
state
pass out     on $int_if inet proto tcp from any to $WWW_IP port 80 keep
state

The only thing I haven't been able to figure out is how to correctly
redirect requests from the firewall box ITSELF.

i.e., while working on the firewall box,

# telnet my.domain.name 80
Trying a.b.c.d...

Telnet can never connect. Doing the same thing on a computer in the internal
network works fine. Of course, using the internal IP also works perfectly. I
have played a bit with additional rdr rules in pf.conf, but I haven't found
the right one yet. I guess it is an issue with my pf.conf rules and the way
things are ordered on the TCP stack (and the interface being used)?  Any
hints would be greatly appreciated! :)

Just wondering,
Thank you for your time,
Michael


Reply via email to