/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */


> I'm reviving an oooold message thread regarding transparent
> redirection.  The
> intention here is to transparently redirect all outdoing packets
> destined for
> port 80 (www) at any address to port 3128 on a specific internal address.
> This would allow me to transparently force all my internal users'
> browsers to
> run their URLs through squid without manually configuring each
> browser to use
> a manual proxy.

Here is the script I use to activate transparent caching with squid. Let me
know if you need explanation or if it doesn't work:

#!/bin/sh
# http_proxy_start
# Here are the important settings in squid.conf:
# http_port               80
# icp_port                3130
# httpd_accel             virtual 80
# httpd_accel_with_proxy  on

/etc/rc.d/init.d/squid start

# rc.firewall   Linux kernel firewalling rules
FW=/usr/local/sbin/ipfwadm-wrapper

# Flush rules, for testing purposes
for i in I O F # A      # If we enabled accouting too
  do
      ${FW} -$i -f
  done

# Redirect to Squid proxy server:
${FW} -I -a acc -P tcp -D default/0 80 -r 80

Here is the stop script:
#!/bin/sh
# http_proxy_stop
FW=/usr/local/sbin/ipfwadm-wrapper

# Flush rules, for testing purposes
for i in I O F # A      # If we enabled accouting too
  do
  ${FW} -$i -f
done

/etc/rc.d/init.d/squid stop

_______________________________________________
Masq maillist  -  [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES 
UNSUBSCRIBING!
or email to [EMAIL PROTECTED]

PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.

Reply via email to