• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

Looking 4 software that'll allow several of my IPs to be used as http proxy at the same time

Does anyone know if something like this exists? I've setup Squid, and it works great, but you can only enable ONE IP to be open for use. This doesn't do me any good when I need several IPs open at once. From what I've been reading, Squid can't enable more than one ip at once.  The ips need to be used as a basic http proxy.

0
JohnDoeSr
Asked:
JohnDoeSr
  • 4
  • 4
1 Solution
 
NopiusCommented:
Squid can listen on one, two, three, ... all IP addresses if you configure it to do so.
Just specify multiple lines like this:

http_port x.x.x.x:8080
http_port y.y.y.y:8080
http_port z.z.z.z:8080

0
 
JohnDoeSrAuthor Commented:
Hello, thanks for the reply.

When doing the above Im able to connect from the windows box to the fbsd box using the IP I enter with 'http_port'. But the outgoing IP remains the same as what I have entered in tcp_outgoing_address. I tried commenting out tcp_outgoing_address but then the proxied IP on the windows box shows as the fbsd boxs main IP. I'm trying to get things setup so that the outgoing ip will be the same as what is being connected to.
0
 
NopiusCommented:
How squid can guess which IP addresses are outgoing and for which incoming IP addresses they should be used?
It's quiet logical to have 1 incoming and 1 outgoing IP (interface).
If you wish more complexity, run several squid's with different config files.
Each copy of Squid will have it's own tcp_outgoing_address and http_port.

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
JohnDoeSrAuthor Commented:
I see what you're saying. So if I wanted 10 different outgoing IPS then simply run 10 instances of Squid, each designating it's own squid.conf file?  Would this require installing Squid again another 9 times in a new location?
0
 
NopiusCommented:
> Would this require installing Squid again another 9 times in a new location?
No, but 10 different squid.conf files and 1 squid installation.

BUT I've read again squid.conf and it seams there is another solution with 1 squid instance with 1 config file.

You may control tcp outgoing address with squid access control lists (acls).

1) Define acl's based on your squid IP addresses
acl my_IP_1 myip 1.1.1.1
acl my_IP_2 myip 1.1.1.2
...
acl my_IP_N myip 1.1.1.N

2) Define several outgoing addresses with corresponding ACL list names like this:
tcp_outgoing_address 2.2.2.1  my_IP_1
tcp_outgoing_address 2.2.2.2  my_IP_2
...
tcp_outgoing_address 2.2.2.M my_IP_2

please test this solution and let me know if it works.



0
 
JohnDoeSrAuthor Commented:
Hi Nopius. I tried the first suggestion about 10 different conf files and had this error when executing the 2nd 'squid squid02.conf' command, "Squid is already running!  Process ID 22285"

I made sure that the ip I had listed for tcp_outgoing_address & http_port for squid01.conf were unique from squid02.conf

I'll give the 2nd suggestion a shot when I have a chance. I'm not familiar with acls. I'm assuming that the only place I'd insert an actual IP of mine would be where you have listed 1.1.1.1, 1.1.1.2, etc... ? I'd leave the my_IP_1 / myip alone? Would I just insert the following into the squid.conf file

acl my_IP_1 myip 64.212.13.4
acl my_ip_2 myip 64.212.13.5

tcp_outgoing_address 64.212.13.4 my_IP_1
tcp_outgoing_address 64.212.13.5 my_IP_2

0
 
JohnDoeSrAuthor Commented:
W00T!  You're the man!
0
 
NopiusCommented:
"Squid is already running!  Process ID 22285"
this also can be resolved by specifying different lock file location in config files, like
squid1.conf:
pid_filename /var/run/squid1.pid
squid2.conf:
pid_filename /var/run/squid2.pid

Anyway if ACL works, it's better to use it.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now