Search squid archive

RE: [squid-users] Configuring tcp_outgoing_address for Squid with 2 internet connections when 1 connection uses dhcp to get the IP address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> 
> Hi all,
> 
> I am nearing completion of the configuration of the OpenBSD Gateway
> with two internet connections.
> 
> So there is a problem with squid.
> 
> The task is to configure a set of users "dsl_users" alone use the DSL
> connection to connect to websites and force all others use the cable
> modem connection. The file "/etc/squid.conf" gives the following
> instructions for that.
> 
> --------------------------------------------------------------
> --------------------------------------------------------------
> -----------
> 
> #  TAG: tcp_outgoing_address
> #       Allows you to map requests to different outgoing IP addresses
> #       based on the username or sourceaddress of the user making
> #       the request.
> #
> #       tcp_outgoing_address ipaddr [[!]aclname] ...
> #
> #       Example where requests from 10.0.0.0/24 will be forwareded
> #       with source address 10.1.0.1, 10.0.2.0/24 forwarded with
> #       source address 10.1.0.2 and the rest will be forwarded with
> #       source address 10.1.0.3.
> #
> #       acl normal_service_net src 10.0.0.0/255.255.255.0
> #       acl good_service_net src 10.0.1.0/255.255.255.0
> #       tcp_outgoing_address 10.0.0.1 normal_service_net
> #       tcp_outgoing_address 10.0.0.2 good_service_net
> #       tcp_outgoing_address 10.0.0.3
> #
> #       Processing proceeds in the order specified, and stops 
> at first fully
> #       matching line.
> #
> #Default:
> # none
> --------------------------------------------------------------
> --------------------------------------------------------------
> ------------
> 
> but the problem is that though I have the IP of the DSL connection
> fixed I get a differrent IP each time I reboot for cable connection.
> So how do I configure this?
> 
> presently i am stuck with the following configuration.
> 
> #
> acl dsl_users src aaa.aaa.aaa.aaa/32, bbb.bbb.bbb.bbb/32, 
> ccc.ccc.ccc.ccc/32
> tcp_outgoing_address dsl.dsl.dsl.dsl dsl_users
> tcp_outgoing_address
> #
> 
> Since I am not able to give the IP address for the last
> "tcp_outgoing_address" squid shows error and doesnot start up.
> 
> Could someone provide an Idea of how to solve the problem ???
> 
 
 - Perhaps , by using a 'dynamic' squid.conf at squid startup.
   The allocated IP can be found, by some os tool (ipconfig and/or friends).
   Perhaps with some 'scripting/editing' it can be hacked into squid.conf
   just before SQUID is started.

   M.


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux