iptables + squid
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
Quoted 9 lines · it clown
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?
Quoted 6 lines
I want to give the clients internet access through squid, thanks.
Regards
_____________________________________________________________________
For super low premiums ,click here http://www.dialdirect.co.za/quote
# allow clients to connect to squid proxy iptables -A INPUT -i $INSIDE_IF -p tcp --syn --dport 3128 -j ACCEPT
# allow squid to fetch web content iptables -A OUTPUT -o $OUTSIDE_IF -p tcp --syn --dport 80 -j ACCEPT
of course--this assumes that you do not allow clients through the FORWARD chain on port 80.
-j
disclaimer: the rules contained in this message are meant to illustrate the requested functionality only, and not intended as a recommendation of best practices. never execute any commands without fully understanding the implications.
Signature · 1 line
Jason Opperisano <[email protected]>
Quoted 22 lines · Jason Opperisano
Quoted 9 lines · it clown
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?
Quoted 6 lines
I want to give the clients internet access through squid, thanks.
Regards
_____________________________________________________________________
For super low premiums ,click here http://www.dialdirect.co.za/quote# allow clients to connect to squid proxy iptables -A INPUT -i $INSIDE_IF -p tcp --syn --dport 3128 -j ACCEPT
Quoted 7 lines
# allow squid to fetch web content iptables -A OUTPUT -o $OUTSIDE_IF -p tcp --syn --dport 80 -j ACCEPTof course--this assumes that you do not allow clients through the FORWARD chain on port 80.
-j
I don't have my printout of the commands here and he might not want to do transparent proxying, but could he not also use the REDIRECT to send any info coming from the $INSIDE_IF that is destined from for port 80 to port 3128? If transparent proxying is alright, then the admin would not have to worry about setting up all of the workstations to direct to port 3128. I am very new to IPTABLES, so I might be way off.
Signature · 12 lines
Scott Mayo
Technology Coordinator
Bloomfield Schools
PH: 573-568-4564
FA: 573-568-4565
Pager: 800-264-2535 X2549
WindowS
LinUX!
Duct tape is like the force, it has a light side and a dark side and it
holds the universe together.Quoted 20 lines · Jason Opperisano
Quoted 9 lines · it clown
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?
Quoted 6 lines
I want to give the clients internet access through squid, thanks.
Regards
_____________________________________________________________________
For super low premiums ,click here http://www.dialdirect.co.za/quote# allow clients to connect to squid proxy iptables -A INPUT -i $INSIDE_IF -p tcp --syn --dport 3128 -j ACCEPT
Quoted 7 lines
# allow squid to fetch web content iptables -A OUTPUT -o $OUTSIDE_IF -p tcp --syn --dport 80 -j ACCEPTof course--this assumes that you do not allow clients through the FORWARD chain on port 80.
-j
I'd like to add that if they need the transparent proxy feature they need a rule like this:
iptables -t nat -A OUTPUT -A PREROUTING -i $INPUTIP -p tcp \
--dport 80 -j REDIRECT --to-ports 3128
and they need to have the squid proxy properly configured to allow the transparent proxy feature.
Signature · 12 lines
Jose Maria Lopez Hernandez Director Tecnico de bgSEC [email protected] bgSEC Seguridad y Consultoria de Sistemas Informaticos http://www.bgsec.com ESPAÑA The only people for me are the mad ones -- the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn like fabulous yellow Roman candles. -- Jack Kerouac, "On the Road"
Quoted 28 lines · Jose Maria Lopez
El dom, 26 de 09 de 2004 a las 16:27, Jason Opperisano escribió:
Quoted 27 lines · it clown
Quoted 9 lines
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?
Quoted 6 lines
I want to give the clients internet access through squid, thanks.
Regards
_____________________________________________________________________
For super low premiums ,click here http://www.dialdirect.co.za/quote# allow clients to connect to squid proxy iptables -A INPUT -i $INSIDE_IF -p tcp --syn --dport 3128 -j ACCEPT# allow squid to fetch web content iptables -A OUTPUT -o $OUTSIDE_IF -p tcp --syn --dport 80 -j ACCEPTof course--this assumes that you do not allow clients through the FORWARD chain on port 80.
-j
quoting OP:
"I need to setup the client pc's that they have to go through the proxy to get to the internet..."
implies he is not asking for transparent proxying.
Quoted 5 lines
I'd like to add that if they need the transparent proxy feature they need a rule like this:
iptables -t nat -A OUTPUT -A PREROUTING -i $INPUTIP -p tcp \
--dport 80 -j REDIRECT --to-ports 3128
even if he is asking for transparent proxying, the proper NAT rule would be:
iptables -t nat -A PREROUTING -i $INSIDE_IF -p tcp --syn --dport 80 \
-j REDIRECT --to-port 3128Quoted 2 lines
and they need to have the squid proxy properly configured to allow the transparent proxy feature.
yes.
-j
disclaimer: the rules contained in this message are meant to illustrate the requested functionality only, and not intended as a recommendation of best practices. never execute any commands without fully understanding the implications.
Signature · 1 line
Jason Opperisano <[email protected]>