Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7699081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:23:42+00:00 2026-05-31T22:23:42+00:00

Hello for all you people, I am setting in Squid-Proxy two outputs internet. Below

  • 0

Hello for all you people,

I am setting in Squid-Proxy two outputs internet. Below is a “diagram”
of the final result I want to get:

SERVER1: SQUID SERVER
SERVER2: Internet2

 :: Client :: ----- SERVER1 ---> INTERNET (MODEM)
                        v
                        |
                        | -----> SERVER2 ----> INTERNET (MODEM 2)

I’ve configured in squid.conf the following lines:

acl route_alt dstdomain .whatismyip.com
tcp_outgoing_address <IP_SERVER2> route_alt

Restarting Squid and trying to access the site, returns me the following error:
“(99) Can not assign requested address“

So googling, I found and did the following:
echo 1> / proc/sys/net/ipv4/ip_nonlocal_bind

Now trying to access the site, returns me the following error:
“(22) Invalid argument“

These errors, only “(99) Can not assign requested address” shows me in
/var/log/squid/cache.log. The other did not find it anywhere.

Strace’ing I found the following:

connect(267, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("72.233.89.199")}, 16) = -1 EINVAL (Invalid
argument)

Squid version is 3.1.19
Linux version: Fedora 15 64 bits
kernel version: 2.6.38.6-26.rc1

Any help is appreciate.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:23:43+00:00Added an answer on May 31, 2026 at 10:23 pm

    tcp_outgoing_address must be used to specify the local IP for outgoing connections, you can’t use foreign IPs there. If you want to control the routing with Squid you should do this:

    First, you need an additional IP address in SERVER1 to use for the communication via SERVER2. Then add in squid.conf:

    tcp_outgoing_address IP2_SERVER1 ACL
    

    After that you have to configure routing:

    ip rule add table 100 from IP2_SERVER1
    ip route add table 100 default via IP_SERVER2
    

    The last two lines set the routing when the packets have IP2_SERVER1 as source.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello to all you people out there I have been trying to download the
Hello for all people... Sorry for my english, but speak spanish... In this week,
I am parsing XML using jQuery. I want to get the count of all
Hello all you helpful people out there (and goodbye none-helpful people :D ). I'm
First of all hello people, and sorry for my bad English, I'm Brazillian! I've
Hello friendly computing people, This is a two part question. I'm writing two shell
Hello all you helpful folks @ stackoverflow! Best resources for Java GUI's? Looking at
Hello all i'm turning objects on (adding the class .active) and off on a
hello all I have a small dialog which I created dynamically, which has a
Problem Hello all! I have this code which takes my jpg image loops through

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.