freebsd 6.2 with ipfw forward not working

danow at magix.com.sg danow at magix.com.sg
Sun Sep 23 22:02:51 PDT 2007


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 

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=/usr/local/sbin' '--sbindir=/usr/local/sbin' '--datadir=/usr/local/etc/squid' '--libexecdir=/usr/local/libexec/squid' '--localstatedir=/usr/local/squid' '--sysconfdir=/usr/local/etc/squid' '--enable-removal-policies=lru heap' '--disable-linux-netfilter' '--disable-linux-tproxy' '--disable-epoll' '--enable-auth=basic ntlm digest' '--enable-basic-auth-helpers=DB NCSA PAM MSNT SMB YP' '--enable-digest-auth-helpers=password' '--enable-external-acl-helpers=ip_user session unix_group wbinfo_group' '--enable-ntlm-auth-helpers=SMB' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-storeio=ufs diskd null' '--enable-pf-transparent' '--enable-ipf-transparent' '--enable-err-languages=Armenian Azerbaijani Bulgarian Catalan Czech Danish  Dutch English Estonian Finnish French German Greek  Hebrew Hungarian Italian Japanese Korean Lithuanian  Polish Portuguese Romanian Russian-1251 Russian-koi8-r  Serbian Simplify_Chinese Slovak Spanish Swedish  Traditional_Chinese Turkish' '--enable-default-err-language=English' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' 'i386-portbld-freebsd6.2' 'build_alias=i386-portbld-freebsd6.2' 'host_alias=i386-portbld-freebsd6.2' 'target_alias=i386-portbld-freebsd6.2' 'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -pipe ' 'LDFLAGS=' 'CPPFLAGS='

in /etc/sysctl.conf
net.inet.ip.forwarding=1

In kernel config,
options IPFIREWALL
options IPFIREWALL_FORWARD


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

Thanks,
Denny


More information about the freebsd-isp mailing list