All of lore.kernel.org
 help / color / mirror / Atom feed
* Transparent Proxy to a Remote Squid Box
@ 2004-11-19 15:50 ro0ot
  2004-11-19 17:11 ` Jason Opperisano
  0 siblings, 1 reply; 2+ messages in thread
From: ro0ot @ 2004-11-19 15:50 UTC (permalink / raw)
  To: netfilter

I am running the below scripts for "Transparent Proxy to a Remote Squid 
Box": -

$IPTABLES -t nat -A PREROUTING -i $cusif -s ! $squid_box -p tcp --dport 
80 -j DNAT --to $squid_box:3128
$IPTABLES -t nat -A POSTROUTING -o $cusif -s $cus_net -d $squid_box -j 
SNAT --to $cus_ip
$IPTABLES -A FORWARD -s $eastin_i001 -d $squid_box -i $cusif -o $cusif 
-p tcp --dport 3128 -j ACCEPT

If the daemon dies, I need to remove the above three lines.  How can I 
monitor the Squid daemon from the firewall? 

Regards,
ro0ot





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Transparent Proxy to a Remote Squid Box
  2004-11-19 15:50 Transparent Proxy to a Remote Squid Box ro0ot
@ 2004-11-19 17:11 ` Jason Opperisano
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Opperisano @ 2004-11-19 17:11 UTC (permalink / raw)
  To: netfilter

On Fri, Nov 19, 2004 at 11:50:28PM +0800, ro0ot wrote:
> I am running the below scripts for "Transparent Proxy to a Remote Squid 
> Box": -
> 
> $IPTABLES -t nat -A PREROUTING -i $cusif -s ! $squid_box -p tcp --dport 
> 80 -j DNAT --to $squid_box:3128
> $IPTABLES -t nat -A POSTROUTING -o $cusif -s $cus_net -d $squid_box -j 
> SNAT --to $cus_ip
> $IPTABLES -A FORWARD -s $eastin_i001 -d $squid_box -i $cusif -o $cusif 
> -p tcp --dport 3128 -j ACCEPT
> 
> If the daemon dies, I need to remove the above three lines.  How can I 
> monitor the Squid daemon from the firewall? 

i do not see how this is at all relevant to a netfilter mailing list.

that being said--there are infinite ways for you to do this--the 10
second response is:

setup shared SSH keys between the firewall and the squid box.

on the firewall, run a cron job that checks for the squid process on the
remote machine:

---begin script---
alive=`ssh $SQUIDHOST "if pgrep squid > /dev/null; then echo 1;else echo 0;
fi"`

if [ $alive -eq 0 ]; then
  iptables -D [ ... ]
fi
---end script---

since this is completely OT--i'm not really looking for comments on the
lameness of the above...  :-D

-j

--
"Ah, good ol' trustworthy beer. My love for you will never die."
        --The Simpsons


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-19 17:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-19 15:50 Transparent Proxy to a Remote Squid Box ro0ot
2004-11-19 17:11 ` Jason Opperisano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.