LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-11-2002, 10:16 AM   #1
gboutwel
Member
 
Registered: May 2001
Location: Norton, KS
Distribution: Mandrake, Xandros, and Debian 3.0 (Woody) as a proxy
Posts: 103

Rep: Reputation: 15
Squid Proxy for DNS, WWW, & FTP


Hey!

I've installed Squid Proxy. I'm working on getting it working for DNS, WWW, & FTP. Ideally it would trasnparently hand caching of all 3 for all machines on my LAN.

I would like to use it's internal DNS Cache for all the machines behind the machine it's installed on (and not have to worry about installing named). Is this possible? If so how? It doesn't appear to be listening on tcp/domain or upd/domain. How to I get it listening to tcp/domain or upd/domain?

Also, I tried 'misserably' lastnight to get the www transparently proxing. I'm using iptables... What's the command to forward all (Internal Net - INTLAN or Internal Interface INTIF) port 80 traffic to another port, like 8080?

Thanks,
 
Old 11-11-2002, 01:32 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

note that eth0 is not my internet interface



squid is listening on port 3128 by default

Last edited by DavidPhillips; 11-11-2002 at 01:44 PM.
 
Old 11-11-2002, 03:47 PM   #3
gboutwel
Member
 
Registered: May 2001
Location: Norton, KS
Distribution: Mandrake, Xandros, and Debian 3.0 (Woody) as a proxy
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by DavidPhillips
iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
Ok. I'll give that a try. Hopefully it works. What I was trying was pretty close to that, but it didn't seem to be working.

Quote:
note that eth0 is not my internet interface
That's ok. eth0 is not my internet itnerface either.

That brings up another one of the issues I keep having. should I be even bother with using eth1 (the NIC that my Cable modem is plugged into) or should I go pretty much always with ppp0? eht1 (the NIC) has not IP information when I run /sbin/ifconfig

Quote:
squid is listening on port 3128 by default
I understand that.

Squid doesn't appear to be handling DNS queries. Is that cause it only handles them for attempts by something to port 3128, or is there something that I'm missing? As when I set machine's (that are behind the Squid/FW machine) DNS to the ip of the Squid/FW machine DNS fails (nslookup returns server not responding). As soon as I set the DNS on those machines back to my ISP's DNS server things work find (they are still going through the Squid/FW machine to get out.

To handle 'transparent' FTP I would need to do:

iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 21 -j REDIRECT --to-ports 3128

right?

Last edited by gboutwel; 11-11-2002 at 03:48 PM.
 
Old 11-11-2002, 05:25 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I believe that squid caches dns info for requests on the port it's using. It will use the nameservers in /etc/resolv.conf unless you give it certain ones to use in the config file

eth0 is the interface my clients connect to. eth1 is my cable modem

I also have clients on eth2

so the rules I use are

-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -i eth2 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
 
Old 11-11-2002, 05:26 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you could also setup the proxy in your browser
 
Old 11-11-2002, 05:36 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
As far as ftp transparent proxy I would say that I don't think it can do it


Look into a program called Frox


http://www.hollo.org/frox/

Last edited by DavidPhillips; 11-11-2002 at 05:40 PM.
 
  


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
Dns, Www, Mail, Firewall, Vpn, Ftp, Dhcp, Wins ricake Mandriva 2 03-30-2004 06:06 PM
Squid (proxy server) and FTP Zingaro2002 Linux - Networking 0 11-05-2003 09:42 AM
FTP Proxy useing Squid Ghost of War Linux - Networking 1 10-23-2003 11:32 PM
configuring squid for ftp proxy? sparsh Linux - Software 0 04-09-2003 08:02 AM

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

All times are GMT -5. The time now is 08:53 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