Hello Max,

I have tried this with rdr but it does not work. Basically I want my squid
server to take another route so i will set its outgoing address to be
192.168.0.2 then route 192.168.0.2 to 192.168.0.1

here is a basic test:

x86:~# traceroute -s 192.168.0.2 196.4.160.2
traceroute to 196.4.160.2 (196.4.160.2) from 192.168.0.2, 64 hops max, 40
byte packets
 1  rrba-32-01.telkomadsl.co.za (165.165.32.1)  18.647 ms  16.511 ms  16.399 ms

as you can see this doesnt work.

It should look like this:
traceroute to 196.4.160.2 (196.4.160.2) from 192.168.0.2, 64 hops max, 40
byte packets
 1  192.168.0.1 (192.168.0.1)  56.107 ms  53.323 ms  44.865 ms

My PF rule:

rdr on ! tun1 inet from 192.168.0.2 to any -> 192.168.0.1

i tried this as aswell:

rdr inet from 192.168.0.2 to any -> 192.168.0.1

Thanks Alot
Mark Bojara


----------------------------------------------------------------
Obiwankenobiphobia: Fear of Jedi Masters
----------------------------------------------------------------
On Thu, 23 Oct 2003, Max Laier wrote:

>> It is no clear what you really want to accomplish, but I think you
>> want rdr and not route-to.
>
>True as ipfw's fwd does more than route-to. Quoting ipfw(8):
>    "If ipaddr is a local address, then matching packets will be for-
>    warded to port (or the port number in the packet if one is not
>    specified in the rule) on the local machine."
>
>To do this with pf, you must use rdr.
>
>> aside from that I don't know the status of route-to and friends in the
>> freebsd port, but Max surely does ;-)
>
>Quite well and working (at least in my tests). Might suffer _a bit_ in
>performance, due to needed locking, compared to OpenBSD.
>
>HB> On Wed, Oct 22, 2003 at 07:56:14PM +0200, Mark Bojara wrote:
>>> Hello All,
>>>
>>> I bet this subject has come up a couple of times. But searching through
>>> the previous threads i could not find a working solution for me.
>>>
>>> I recently compiled pf/altq in FreeBSD 5.1 to see how it runs. I am trying
>>> to set up so that all traffic comming from 192.168.0.2 is routed to
>>> 192.168.0.1.
>>>
>>> My default route points to tun0 and 192.168.0.0/30 sits on tun1.
>>>
>>> in FreeBSD's ipfw i do:
>>> ipfw add fwd 192.168.0.1 ip from 192.168.0.0/30 to any via tun0 (this works fine)
>>>
>>> in PF i do:
>>> pass out quick on tun0 route-to (tun1 192.168.0.1) from 192.168.0.0/30 to any
>>>
>>> This does not work.. I reall dislike ipfw and would like to get the whole
>>> system working on PF.
>>>
>>> Thanks alot
>>> Mark Bojara
>>>
>
>--
>Best regards,
> Max                            mailto:[EMAIL PROTECTED]
>
>

Reply via email to