Austin SEO Company | TastyPlacement
Call Now: 512-535-2492
  • Austin SEO
    • TastyPlacement in the Press
    • Team
    • Our Markets
      • SEO Dallas TX
      • SEO Houston TX
      • SEO San Antonio TX
  • Blog | Tutorials
  • Services
    • Industry Specific
      • HVAC SEO & Marketing
    • Local
      • Local Directory Submission
      • Google Maps Ranking Consulting
    • Mobile
      • Mobile SEO and Digital Marketing
      • Mobile Website Design
    • Web Development
      • Ecommerce Web Dev
      • WordPress Development
    • Tracking & Analytics
      • Analytics and Monitoring
      • Web Performance Call Tracking
      • SEO Article Tracker Software
    • PPC Management
    • WordPress SEO Service
    • Infographic Development
    • Social Media Marketing
  • Case Studies & Portfolios
    • Infographic Portfolio
    • SEO Portfolio
    • SEO Testimonials
    • Design Portfolio
  • Contact TastyPlacement
    • Job: Local Digital Marketing Specialist
    • Job: Social Media Manager Trainee
    • Job: Search Marketing Trainee
    • Job: SEO and Internet Marketing Sales
    • Privacy Policy & Terms of Use
    • Google Adwords Disclosure

Configure Squid Proxy for Multiple Outgoing IP Addresses

Configure Squid Proxy for Multiple Outgoing IP Addresses

Setup Your Own Multiple-IP, Private Group of Proxies on a Single VPS Installation

After much researching online in forum discussions and some hair-pulling troubleshooting (and a nudge in the right direction from Ralf at Tradebit), we’ve assembled a fairly reliable set of instructions for configuring Squid Proxy to employ multiple outgoing IP addresses from a single Squid installation and (this is the key) allowing you to connect through any of the outbound IP addresses depending on the IP address by which you connect to the Squid Cache server.

Squid CacheThere are a few incomplete ways to do this. Some of the existing tutorials like this one go only part of the way: they let client A from one IP address can connect through one outgoing IP address, and client B from a second IP address can connect through another outgoing IP address. This is limiting: client A can only use one outgoing IP. With our setup, we can use any of our many outgoing IP addresses.

Our Setup & Plan

We run Squid Cache on a basic VPS service running Linux. We are using Squid-3.2.1. Our VPS has six IP addresses, so we want to receive clients on any six of those IP addresses and direct Squid to use the same corresponding IP address for its outgoing connections. Because our VPS listens on all six IP addresses, we will designate separate ports for each inbound connection. It’s probably worth mentioning that we aren’t caching anything–we are simply using squid as a proxy.

Configuration

Obviously, we’ll be modifying the squid.conf file. We’ll be using the following configuration directives:

  • http_port
  • name=
  • myportname
  • acl
  • http_access
  • tcp_outgoing_address

First, we want to tell Squid what IPs and ports to listen on, and we want to use the “name=” option with http_port:

# Squid normally listens to port 3128
http_port 67.xxx.108.128:3128 name=3128
http_port 67.xxx.108.79:3129 name=3129
http_port 67.xxx.108.80:3130 name=3130
http_port 67.xxx.108.221:3131 name=3131
http_port 208.xxx.34.154:3132 name=3132
http_port 208.xxx.34.32:3133 name=3133

We just asked Squid to listen on sequential ports and to designate a name for each inbound connection.  Now that we’ve named the inbound connections, we can designate an ACL based on each inbound connection name and assign an outgoing IP to each:

acl tasty3128 myportname 3128 src 24.xxx.210.0/24
http_access allow tasty3128
tcp_outgoing_address 67.xxx.108.128 tasty3128

acl tasty3129 myportname 3129 src 24.xxx.210.0/24
http_access allow tasty3129
tcp_outgoing_address 67.xxx.108.79 tasty3129

acl tasty3130 myportname 3130 src 24.xxx.210.0/24
http_access allow tasty3130
tcp_outgoing_address 67.xxx.108.80 tasty3130

acl tasty3131 myportname 3131 src 24.xxx.210.0/24
http_access allow tasty3131
tcp_outgoing_address 67.xxx.108.221 tasty3131

acl tasty3132 myportname 3132 src 24.xxx.210.0/24
http_access allow tasty3132
tcp_outgoing_address 208.xxx.34.154 tasty3132

acl tasty3133 myportname 3133 src 24.xxx.210.0/24
http_access allow tasty3133
tcp_outgoing_address 208.xxx.34.32 tasty3133

That’s it. You should now be able to connect to any of your six IP addresses through Squid.

 

About the Author: Michael David


Michael David is the founder, current CEO, and lead strategist at TastyPlacement, based in Austin, Texas. He is the author of "WordPress 3.0 Search Engine Optimization" with the prestigious IT publisher, Packt Publishing. TastyPlacement performs search marketing campaigns, public relations, search engine optimization, social media consulting and online advertising for companies in a wide range of fields.

2 comments on “Configure Squid Proxy for Multiple Outgoing IP Addresses”

  1. Jim Robinson says:
    December 7, 2012 at 4:56 pm

    What’s the primary use case for this? There are probably a lot of possibilities, but might this be useful for rank checking?

    Reply
    • Michael David says:
      December 8, 2012 at 7:20 am

      DING!

      That’s exactly right, we use it for rank checking.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog and Tutorial Categories

  • Backlink Strategies
  • Infographics
  • Internet Marketing
  • Local Maps and Local Listings
  • Mobile SEO
  • Our Book: SEO for Wordpress
  • PHPLD
  • Portfolio
  • PPC
  • Programming & PHP
  • SEO
  • SEO Power Tools
  • SEO Resources
  • Social Media Marketing
  • Web Design
  • WordPress

Recent Posts and Tutorials

  • New Places for Business Bulk Upload Tool
  • Google Places Update: How to Find Missing Google+ Local Listings
  • New Orleans Pubcon 2013 Epic Dining Guide
  • Infographic: Fonts & Colors That Drive the World’s Top Brands
  • Infographic: Urban Mining
Call: 512.535.2492

Our Core Services

  • Austin SEO
  • Dallas SEO
  • San Antonio SEO
  • Austin PPC Management
  • WordPress SEO Service

Some Rich Snippets…

TastyPlacement

3910 S I H 35 Ste 302
Austin, Texas 78704-7424 USA
Office: (512) 535-2492

Scan Me

QR Code

Let’s Be Super Best Friends:

  • TastyPlacement on LinkedIn
  • TastyPlacement on Facebook
  • TastyPlacement on Twitter

TastyPlacement