All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables & squid
@ 2005-10-15 13:54 Daniel Ivanov
  2005-10-16 18:16 ` Henrik Nordstrom
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Ivanov @ 2005-10-15 13:54 UTC (permalink / raw)
  To: netfilter

I could finally manage to bump packets from a bsd box to my squid and 
thanks to ipfw they come un-rewritten in the form
{internal_net_ip} -> {destination_ip}
This is ok. I set a simple redirect rule in the prerouting:
iptables -t nat -A PREROUTING -p tcp --dport 80 -s internal_net/mask -j 
REDIRECT --to-ports 80

Packets jump to my proxy and pass through.
But i get them returned in the form:
{squid_box} -> {ip_from_internal_network}
 This way they are impossible for shaping. How would i make such a packet
{destination_ip} -> {internal_net_ip}
by means of iptables.

Would a DNAT do the trick and will it be hit if a have a REDIRECT target 
already in the PREROUTING.
Otherwise the REDIRECT is also available in the OUTPUT chain of the nat 
table.


^ permalink raw reply	[flat|nested] 14+ messages in thread
* Iptables, squid
@ 2006-11-27  8:48 alok pathak
  2006-11-27 10:51 ` piraguasu
  0 siblings, 1 reply; 14+ messages in thread
From: alok pathak @ 2006-11-27  8:48 UTC (permalink / raw)
  To: netfilter

Hi all,

The problem with me:
1. I want my users to access the internet(but bandwith must be limited
to each of them say 64kbps).
2. I configured delay pools in squid for this.
3. I also don't want to specify proxy settings on each users computer.
4. I also want to let my users use Yahoo WebCam, Bittorrent clients
etc, but without proxy settings.
5. I configured transparent proxy, but able to impose bandwidth limit
on http traffic only (port 80)
Can I use something other than squid?
Please help.
Thanks,
Alok Pathak


^ permalink raw reply	[flat|nested] 14+ messages in thread
* iptables+squid
@ 2004-09-26 10:40 it clown
  0 siblings, 0 replies; 14+ messages in thread
From: it clown @ 2004-09-26 10:40 UTC (permalink / raw)
  To: netfilter

Hi All,

I want to run squid on the same box as iptables.I need to
setup the client pc's that they have to go through the
proxy to get to the internet... port 3128.They must not be
able to by pass the proxy to get internet access.What rule
do i need to add to iptables to only allow squid to have
internet access?

I want to give the clients internet access through squid,
thanks.

Regards
_____________________________________________________________________
For super low premiums ,click here http://www.dialdirect.co.za/quote


^ permalink raw reply	[flat|nested] 14+ messages in thread
* iptables + squid
@ 2004-09-26  5:35 it clown
  2004-09-26 14:27 ` Jason Opperisano
  0 siblings, 1 reply; 14+ messages in thread
From: it clown @ 2004-09-26  5:35 UTC (permalink / raw)
  To: netfilter

Hi All,

I want to run squid on the same box as iptables.I need to
setup the client pc's that they have to go through the
proxy to get to the internet... port 3128.They must not be
able to by pass the proxy to get internet access.What rule
do i need to add to iptables to only allow squid to have
internet access?

I want to give the clients internet access through squid,
thanks.

Regards
_____________________________________________________________________
For super low premiums ,click here http://www.dialdirect.co.za/quote


^ permalink raw reply	[flat|nested] 14+ messages in thread
* IPTables & Squid
@ 2003-07-31 23:51 Daniel Camacho
  2003-08-01  8:10 ` Philip Craig
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Camacho @ 2003-07-31 23:51 UTC (permalink / raw)
  To: netfilter


Hi all,

I'm new to this list and to IPtables. I recently installed a transparent 
proxy using Squid and IPtables. On one computer, I installed IPtables and 
forward all port 80 requests to the Squid server, which is running on a 
separate server. On that same computer I want to be able to filter certain 
connections from using the Squid. I know I can do this with Squid, but I 
want to know how to do it with IPtables. Does anyone know how may I go 
about doing this? Thanks.

Daniel

Here's the script I use:

192.168.0.1 = Squid server
192.168.0.25 = Netfilter Server

# start up filter rules for traffic redirection to Squid
iptables -t nat -A PREROUTING -i eth0 -s ! 192.168.0.1 -p tcp --dport 80 -j 
DNAT --to 192.168.0.1:3128

# Add for 0 subnet
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -d 192.168.0.1 -j 
SNAT --to 192.168.0.25
iptables -A FORWARD -s 192.168.0.0/24 -d 192.168.0.1 -i eth0 -o eth0 -p tcp 
--dport 3128 -j ACCEPT
#
# Add for 2 subnet
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -d 192.168.0.1 -j 
SNAT --to 192.168.0.25
iptables -A FORWARD -s 192.168.2.0/24 -d 192.168.0.1 -i eth0 -o eth0 -p tcp 
--dport 3128 -j ACCEPT
#
# Add for 3 subnet
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.3.0/24 -d 192.168.0.1 -j 
SNAT --to 192.168.0.25
iptables -A FORWARD -s 192.168.3.0/24 -d 192.168.0.1 -i eth0 -o eth0 -p tcp 
--dport 3128 -j ACCEPT



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

end of thread, other threads:[~2006-11-27 10:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-15 13:54 iptables & squid Daniel Ivanov
2005-10-16 18:16 ` Henrik Nordstrom
  -- strict thread matches above, loose matches on Subject: below --
2006-11-27  8:48 Iptables, squid alok pathak
2006-11-27 10:51 ` piraguasu
2004-09-26 10:40 iptables+squid it clown
2004-09-26  5:35 iptables + squid it clown
2004-09-26 14:27 ` Jason Opperisano
2004-09-26 18:54   ` Scott Mayo
2004-09-26 20:33   ` Jose Maria Lopez
2004-09-26 20:57     ` Jason Opperisano
2003-07-31 23:51 IPTables & Squid Daniel Camacho
2003-08-01  8:10 ` Philip Craig
2003-08-01 21:25   ` Daniel Camacho
2003-08-01 23:00     ` Arnt Karlsen

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.