Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2007 12:50:35 +0800
From:      danow@magix.com.sg
To:        freebsd-isp@freebsd.org
Subject:   freebsd 6.2 with ipfw forward not working
Message-ID:  <20070924045035.GB30086@singtel.com>
In-Reply-To: <20070924044357.GA30086@singtel.com>
References:  <20070924044357.GA30086@singtel.com>

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

I have a rule in ipfw to divert all destination address with tcp port 80 to=
 a local squid server. However this is working for me. When i did a tcpdump=
 on lo0, no packets are seen.

ipfw rules
add fwd 127.0.0.1,3128 log tcp from  any to any=20

and in /var/log/security shows the packet being forwarded.

This is what squid -v shows
Squid Cache: Version 2.6.STABLE16
configure options:  '--bindir=3D/usr/local/sbin' '--sbindir=3D/usr/local/sb=
in' '--datadir=3D/usr/local/etc/squid' '--libexecdir=3D/usr/local/libexec/s=
quid' '--localstatedir=3D/usr/local/squid' '--sysconfdir=3D/usr/local/etc/s=
quid' '--enable-removal-policies=3Dlru heap' '--disable-linux-netfilter' '-=
-disable-linux-tproxy' '--disable-epoll' '--enable-auth=3Dbasic ntlm digest=
' '--enable-basic-auth-helpers=3DDB NCSA PAM MSNT SMB YP' '--enable-digest-=
auth-helpers=3Dpassword' '--enable-external-acl-helpers=3Dip_user session u=
nix_group wbinfo_group' '--enable-ntlm-auth-helpers=3DSMB' '--enable-negoti=
ate-auth-helpers=3Dsquid_kerb_auth' '--enable-storeio=3Dufs diskd null' '--=
enable-pf-transparent' '--enable-ipf-transparent' '--enable-err-languages=
=3DArmenian Azerbaijani Bulgarian Catalan Czech Danish  Dutch English Eston=
ian Finnish French German Greek  Hebrew Hungarian Italian Japanese Korean L=
ithuanian  Polish Portuguese Romanian Russian-1251 Russian-koi8-r  Serbian =
Simplify_Chinese Slovak Spanish Swedish  Traditional_Chinese Turkish' '--en=
able-default-err-language=3DEnglish' '--prefix=3D/usr/local' '--mandir=3D/u=
sr/local/man' '--infodir=3D/usr/local/info/' 'i386-portbld-freebsd6.2' 'bui=
ld_alias=3Di386-portbld-freebsd6.2' 'host_alias=3Di386-portbld-freebsd6.2' =
'target_alias=3Di386-portbld-freebsd6.2' 'CC=3Dcc' 'CFLAGS=3D-O2 -fno-stric=
t-aliasing -pipe ' 'LDFLAGS=3D' 'CPPFLAGS=3D'

in /etc/sysctl.conf
net.inet.ip.forwarding=3D1

In kernel config,
options IPFIREWALL
options IPFIREWALL_FORWARD


Any idea what's wrong with my config? Have i missed out anything?

Thanks,
Denny



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070924045035.GB30086>