Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2001 23:55:21 -0500
From:      "Anthony" <bytehedd@yahoo.com>
To:        <freebsd-questions@freebsd.org>
Subject:   ipfw forwarding to remote machines
Message-ID:  <000c01c0861f$e07a6640$0201a8c0@flashcom.com>

next in thread | raw e-mail | index | archive | help
Hi,

Recently i setup a transparent proxy server with squid.  That worked just
fine, used a fwd rule to forward all traffic to localhost, etc.  Now I have
more of a problem though.

I have a gateway at 30.30.30.1 and a proxy server at 20.20.20.1.  Both have
public interfaces and are not connected through any sort of private network.
What I need to do is to forward all traffic on port 80 of the gateway
30.30.30.1 (thus allowing for transparent caching for people behind it) to
the proxy server 20.20.20.1.

I made the following rule (where 10.10.0.0/16 is the gateway's:internal
network)
/sbin/ipfw add fwd 20.20.20.1 tcp from 10.10.0.0/16 to any 80
and it doesn't work. packets don't get directed to 20.20.20.1, they just go
where they are supposed to.  If I run squid locally and forward to
localhost, it does fine (its just that its a P130 with 800M hdd, kinda
stupid to run squid on it)
The kernel is compiled with all necessary options. (since nat works, and
forwarding to localhost works)

Also the manual says that if you fwd to an IP that is further than one hop
away, the routing table will be used to relay the packet. host 20.20.20.1 is
fully accessible!

Can someone tell me what I can do about this, or possibly suggest an
alternative forwarding solution?

Thanks all!


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000c01c0861f$e07a6640$0201a8c0>