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 - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-14-2010, 07:53 AM   #1
fandar
Member
 
Registered: Oct 2006
Posts: 61

Rep: Reputation: 15
Squid multiple IPS


Hello, I need to configure squid to use multiple public IP addresses
I have configured network interfaces:
Quote:
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:64.xxx.xxx.130 Bcast:xx.xxx.xx.xxx Mask:255.255.255.248
inet6 addr: Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:95759941 errors:0 dropped:0 overruns:0 frame:0
TX packets:60532364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:116895655050 (116.8 GB) TX bytes:9481321322 (9.4 GB)
Interrupt:16
Quote:
eth0:1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:69.xxx.xxx.1 Bcast:69.xxx.xxx.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16
[QUOTE]
Quote:
eth0:2 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:69.xxx.xxx.2 Bcast:69.xxx.xxx.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16
So I have 254 virtual interfaces with Public ips 1-255
I added this to my squid.conf
Quote:
acl ip1 myip 69.xxx.xxx.1
tcp_outgoing_address 69.xxx.xxx.1 ip1
acl ip2 myip 69.xxx.xxx.2
tcp_outgoing_address 69.xxx.xxx.2 ip2
So when I use address 69.xxx.xxx.1 for proxy connection on my home PC, I should have public IP 69.xxx.xxx.1, for 69.xxx.xxx.2 69.xxx.xxx.2,etc.

But when I connect to the ip 69.xxx.xxx.1, my ip address is still the main eth0 address
Your IP: 64.xxx.xxx.130 (port 45280)

So it seems, that the squid tcp_outgoing_address isnt working?
What can be wrong there?

Linux distribution is Debian.

Thank You
 
Old 12-01-2011, 10:25 PM   #2
Traffic
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
Bump...
 
Old 12-02-2011, 08:49 AM   #3
agentbuzz
Member
 
Registered: Oct 2010
Location: Texas
Distribution: Debian, Ubuntu, CentOS, RHEL
Posts: 131

Rep: Reputation: 25
fandar,
It seems that your virtual interfaces on the Debian box should be non-routable addresses, 10.10.1.2, 10.10.1.3, etc. I don't understand why you have configured so many sub-interfaces with public IP addresses, but you need to set up your firewall to PAT one public address on one service port, like 80, to the squid box on 3128, then publish that as "www.domain.com" in your external DNS, if you are trying to reverse-proxy to your web farm. For internal client connections, you should manually configure workstations to use the internal IP with the squid listener on it, or offer a wpad.dat file to clients from an internal web server.
 
Old 12-02-2011, 09:30 AM   #4
Traffic
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
This did work correctly =>

Quote:
acl ip1 myip xx.xx.xx.01
acl ip2 myip xx.xx.xx.02
acl ip3 myip xx.xx.xx.03

tcp_outgoing_address xx.xx.xx.01 ip1
tcp_outgoing_address xx.xx.xx.02 ip2
tcp_outgoing_address xx.xx.xx.03 ip3
Of course utilizing real outside IP addresses...


...
 
  


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
Getting things straight: Apache, SSL, Multiple External IPs / Internal IPs robin.com.au Linux - Server 21 10-13-2007 11:39 PM
Squid can listen in 2 different Ips xrtc Linux - Networking 1 11-15-2005 12:32 AM
how to define a specific range of IPs and/or multiple IPs in an iptables rule?... TheHellsMaster Linux - Security 9 09-20-2004 10:06 AM
how squid find ips mchitrakar Linux - Networking 3 06-11-2004 07:50 AM
multiple ips, multiple gateways, one interface drpixel Linux - Networking 6 12-04-2002 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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