LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-25-2008, 09:11 AM   #1
zeeshan12
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Rep: Reputation: 0
squid configuration, multiple eth interfaces


Hi,

I am trying to install a squid proxy on my Linux 2.6.9-55.0.12.EL server. I have got 3 eth interfaces on the server. All I wana do is to pass on the same IP address to the remote website through squid that I made the request with.

So for example I had ip3 (10.10.10.3) in my browser proxy settings. The squid should not pass on the main IP of the server to the remote host. It should pass ip3.

These are the changes i've made in squid.conf. It only works if I access it using localhost as proxy. If i use a different IP if gives me Access Denied error. Could anyone please have a look and tell me what i've done wrong. This is my first time setting up a squid btw so sorry if i could not explain anything properly.


acl in_10_10_10_1 myip 10.10.10.1
tcp_outgoing_address 10.10.10.1 in_10_10_10_1
acl in_10_10_10_2 myip 10.10.10.2
tcp_outgoing_address 10.10.10.2 in_10_10_10_2
acl in_10_10_10_3 myip 10.10.10.3
tcp_outgoing_address 10.10.10.3 in_10_10_10_3


acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl CONNECT method CONNECT
http_access deny !Safe_ports

acl localips src 10.10.10.1/3
http_access allow localhost
http_access allow localips

http_access deny all



Many Thanks
 
Old 03-25-2008, 09:19 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
can you clarify that localips acl? 10.10.10.1/3?? what's that meant to mean?
 
Old 03-25-2008, 09:25 AM   #3
zeeshan12
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
can you clarify that localips acl? 10.10.10.1/3?? what's that meant to mean?
thats to allow all 3 IPs to connect to the proxy server. It was returning an Access denied error if i used any ip in proxy settings so i thought this would allow access to the IPs. It still didn't work though.
 
Old 03-25-2008, 09:28 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
all three what ip's? 10.10.10.1/3 would cover ip addresses 0.0.0.1 through to 31.255.255.254... what are you valid client ip addresses?
 
Old 03-25-2008, 09:37 AM   #5
zeeshan12
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
all three what ip's? 10.10.10.1/3 would cover ip addresses 0.0.0.1 through to 31.255.255.254... what are you valid client ip addresses?
I only have 3 eth interfaces on server. Each on its own IP from 10.10.10.1 to 10.10.10.3
 
Old 03-25-2008, 09:38 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well i guess you just don't understand CIDR and subnets, but anyway. what are your client ip addresses? your access lists are still relative to the actual client ip at this stage.
 
Old 03-25-2008, 09:48 AM   #7
zeeshan12
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
I would only be using the proxy from the same system. So there would be no other clients apart from the server itself.
 
Old 03-25-2008, 11:02 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
o, this makes NO sense... you have a proxy with NO clients but three ethernet interfaces and you want to arbitrarily use those addresses on those seperate cards for web requests you'll make insternally to the machine?? wtf?? where are these requests going to? the world interweb? if so then those IP's are illegal anyway, and that's never going to work...
 
Old 03-25-2008, 12:26 PM   #9
zeeshan12
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
i'm sorry man i know its a bit confusing. Well, let me just try n explain it again.

I have a dedicated server with 2 additional IPs. I have some php code thats hosted on one of the domains on that server. The code just goes and fetches some content from a website. Now each time it fetches content it goes through the same IP. All I wana do is to enable the proxy server so that I can make the php code use a different IP each time. I've been trying to insall squid from past 3 days now since squid can bind to all the IPs if you have multiple eth interfaces and than I can chose in my php code which proxy IP I want to go through to fetch the content from the remote website.

Please let me know if its still not clear.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting metric for eth interfaces? Calab Linux - Networking 15 12-01-2015 12:16 PM
eth interfaces drop after a while agreenwood Slackware 2 01-31-2006 02:27 PM
configuring eth interfaces problem cranium2004 Linux - Networking 5 04-07-2005 07:55 AM
Two eth interfaces, but one only with internet... Creak Linux - Networking 6 03-12-2005 02:52 AM
Red Hat 7.3 and multiple gateways on multiple interfaces bluefmc Linux - Networking 2 11-19-2004 06:01 PM

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

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