LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-06-2005, 12:34 AM   #1
zefram
Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 42

Rep: Reputation: 15
transparenting proxy with squid


(i'm new to linux)

I have followed 2 similar how-to's on making a transparent proxy using squid. Currently squid is working fine, but it's not transparent yet.

I get my internet from a pppoe dailup, to be shared/proxied to 2 pc's on local network.

According to the how-to's, the last step is to do this:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

The settings is right, as far as I can see. The network device is eth0, and squid is running on 3128.

I have checked the iptable with "iptables -t nat -L", and it looks like the how-to wants it.

But nothing happens when I try to surf on a client computer. (have set the client pc's gateway to the squid pc, and selected 'direct internet' inside firefox).

I think the problem may be with iptables. I am having trouble making it log what it's doing. As I understand it, I should add this:

iptables -A INPUT -p tcp --sport 80 -j LOG

and then, the log should appear in /var/log/messages?
 
Old 11-06-2005, 10:52 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
REDIRECT will pass traffic to the port specified on eth0 so squid needs to be listening on eth0:3128..

Do netstat -tlnp to see where it's listening.

Your LOG rule needs to be iptables -I INPUT -i eth0 -p tcp --dport 3128 -j LOG
coz the routing has changed the port number..
 
  


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
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
configure squid proxy with microsoft proxy as a parent proxy nintykola Linux - Software 1 08-28-2007 01:38 AM
Need help to connect a squid proxy to connect to another squid proxy server bellerophon Linux - Newbie 1 02-07-2006 06:52 AM
squid proxy pudhiyavan Linux - Software 3 08-24-2005 08:41 PM
Squid Proxy joseph Linux - Software 2 09-26-2003 11:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:27 PM.

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