LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-08-2006, 01:56 PM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Rep: Reputation: 30
Thumbs up squid filtering


I have squid listening on my internal interface and i wouldn't make it listen on the public one or have a second squid instance running .Would still be possible for me to filter incoming connection from eth0 to internal www server with the following iptables -t nat -A PREROUTING -i eth0 -d 192.168.1.3(internal www)--dport 80 -j REDIRECT --to-port 3128 or it should point to 192.168.1.0/24 in the -d field?neather of both ... ?
 
Old 04-08-2006, 03:10 PM   #2
jack36987
LQ Newbie
 
Registered: Apr 2006
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
From the look of the command you want to change all traffic heading towards your webserver on port 80 to port 3128. Is that what you wanted?

If you put 192.168.1.0/24 in the d field then any traffic into that subnet on port 80 would be redirected to port 3128. You shouldn't need to do that if your just trying to redirect the port for your webserver.

If i remember right then these commands will only work if your not masquerading for your internal subnet. Otherwise the external comp wouldn't know the private IP of the web server.

Got that or have i lost you in my wandering?
 
Old 04-08-2006, 08:46 PM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
Yes that's right all port 80 traffic for the webserver 192.168.1.3 in 192.168.1.0/24 through the squid on gateway 192.168.1.1 eth1,there is 1 think confusing me.Squid is supposed to cache web pages for browsers and they work on a port number something around port 30000 and not 3128 which is a privileged port and is used to filter traffic redirected from port 80 of people connecting to my internal web server right ? So squid apart caching can work as a firewall , port farwarder what else ?I don't know if i fully realized the way it works !

Last edited by gabsik; 04-08-2006 at 08:51 PM.
 
Old 04-09-2006, 02:06 AM   #4
jack36987
LQ Newbie
 
Registered: Apr 2006
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
The firewalling and port fowarding is done by Iptables, which is part of the kernel and not a squid thing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using Squid, Dansguardian and IPtables as web filtering! cryonics Linux - Networking 7 05-09-2006 01:00 PM
Content Filtering using Squid toraghun Red Hat 3 11-10-2005 10:42 PM
squid/dansguardian simple banner filtering by size win32sux Linux - Software 1 06-25-2005 02:57 PM
url filtering using Squid RajaRC Red Hat 1 11-07-2003 07:21 AM
Sendmail Spam filtering and Virus filtering MrJoshua Linux - General 2 04-03-2003 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration