Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-10-02 Thread Eliezer Croitoru
Hey,

Give try to give me some specs on what you need(maybe In pm) and I will see if 
I might sketch you a tiny NAT proxy.
Take a peek at:
https://github.com/LiamHaworth/go-tproxy

It's a very nice library which you might be able to use.

Eliezer

* There are more then one vendor out there which modified the kernel TCP stack 
and the TPROXY feature to make it 100% transparent which is similar to NAT.


http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: elie...@ngtech.co.il


From: arya6...@gmail.com [mailto:arya6...@gmail.com] On Behalf Of xpro6000
Sent: Monday, October 2, 2017 08:04
To: Eliezer Croitoru 
Cc: squid-users@lists.squid-cache.org
Subject: Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

I did some research on tproxy, this is pretty much the Linux firewall right? 
There is not much documentation about it online

On Sat, Sep 30, 2017 at 5:21 PM, Eliezer Croitoru <mailto:elie...@ngtech.co.il> 
wrote:
Anyone mentioned tproxy?
It works for me...

Eliezer


http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: tel:%2B972-5-28704261
Email: mailto:elie...@ngtech.co.il


From: squid-users [mailto:mailto:squid-users-boun...@lists.squid-cache.org] On 
Behalf Of xpro6000
Sent: Saturday, September 30, 2017 00:02
To: mailto:squid-users@lists.squid-cache.org
Subject: [squid-users] Make all IPv6 ips on system to be used as a proxy

I have multiple IPs on my Linux system and I need one of my programs to be able 
to choose which IP to use. One way to achieve this is to use a proxy server. 
But with Squid's default config file, the IP I connect to, is not the IP used 
for the outgoing connection.

Is there anything I can do to enable Squid to use the same incoming IP for the 
outgoing IP?


___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-10-01 Thread Amos Jeffries

On 02/10/17 18:03, xpro6000 wrote:
I did some research on tproxy, this is pretty much the Linux firewall 
right? There is not much documentation about it online




No, netfilter/iptables is the Linux firewall.

TPROXY is a feature of the Linux TCP stack. BSD stacks have a different 
name for it, but very similar behaviour.


The docs as relate to Squid can be found here:


Amos
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-10-01 Thread xpro6000
I did some research on tproxy, this is pretty much the Linux firewall
right? There is not much documentation about it online

On Sat, Sep 30, 2017 at 5:21 PM, Eliezer Croitoru 
wrote:

> Anyone mentioned tproxy?
> It works for me...
>
> Eliezer
>
> 
> http://ngtech.co.il/lmgtfy/
> Linux System Administrator
> Mobile: +972-5-28704261
> Email: elie...@ngtech.co.il
>
>
> From: squid-users [mailto:squid-users-boun...@lists.squid-cache.org] On
> Behalf Of xpro6000
> Sent: Saturday, September 30, 2017 00:02
> To: squid-users@lists.squid-cache.org
> Subject: [squid-users] Make all IPv6 ips on system to be used as a proxy
>
> I have multiple IPs on my Linux system and I need one of my programs to be
> able to choose which IP to use. One way to achieve this is to use a proxy
> server. But with Squid's default config file, the IP I connect to, is not
> the IP used for the outgoing connection.
>
> Is there anything I can do to enable Squid to use the same incoming IP for
> the outgoing IP?
>
>
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-09-30 Thread Eliezer Croitoru
Then he doesn't need Squid but a customized proxy for ipv6 and ipv4..
Right?

Eliezer


Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: elie...@ngtech.co.il



-Original Message-
From: squid-users [mailto:squid-users-boun...@lists.squid-cache.org] On Behalf 
Of Amos Jeffries
Sent: Sunday, October 1, 2017 06:44
To: squid-users@lists.squid-cache.org
Subject: Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

On 01/10/17 10:21, Eliezer Croitoru wrote:
> Anyone mentioned tproxy?
> It works for me...
> 

It serves if none wants the same IP on both incoming and outgoing 
traffic. But the question was only for determining static IPs on 
outgoing based on Squids listening *ports*, ignoring client IP - more 
like a NAT attempt than transparent proxy.

Amos
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-09-30 Thread Amos Jeffries

On 01/10/17 10:21, Eliezer Croitoru wrote:

Anyone mentioned tproxy?
It works for me...



It serves if none wants the same IP on both incoming and outgoing 
traffic. But the question was only for determining static IPs on 
outgoing based on Squids listening *ports*, ignoring client IP - more 
like a NAT attempt than transparent proxy.


Amos
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-09-30 Thread Eliezer Croitoru
Anyone mentioned tproxy?
It works for me...

Eliezer


http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: elie...@ngtech.co.il


From: squid-users [mailto:squid-users-boun...@lists.squid-cache.org] On Behalf 
Of xpro6000
Sent: Saturday, September 30, 2017 00:02
To: squid-users@lists.squid-cache.org
Subject: [squid-users] Make all IPv6 ips on system to be used as a proxy

I have multiple IPs on my Linux system and I need one of my programs to be able 
to choose which IP to use. One way to achieve this is to use a proxy server. 
But with Squid's default config file, the IP I connect to, is not the IP used 
for the outgoing connection. 

Is there anything I can do to enable Squid to use the same incoming IP for the 
outgoing IP?

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-09-29 Thread Aaron Turner
Run multiple instances of squid, one per IP address?  I'm not aware of
some magic config option to do what you want.

Seriously though, using a proxy to control your outgoing IP address is
weird.Use setsockopt(SO_BINDTODEVICE) in your code.
--
Aaron Turner
https://synfin.net/ Twitter: @synfinatic
My father once told me that respect for the truth comes close to being
the basis for all morality.  "Something cannot emerge from nothing,"
he said.  This is profound thinking if you understand how unstable
"the truth" can be.  -- Frank Herbert, Dune


On Fri, Sep 29, 2017 at 5:13 PM, xpro6000  wrote:
> The program is multithreaded so the process based routing won't work. There
> is no simple way to make Squid use the connecting IP for the outgoing IP?
>
> On Fri, Sep 29, 2017 at 6:37 PM, Aaron Turner  wrote:
>>
>> If you don't need a proxy server for other reasons, there are better
>> ways.  Example, per-process routing:
>>
>> http://www.evolware.org/?p=369
>>
>> Or if you have control over the source code of the software,
>> setsockopt() will do it for you as well.
>> --
>> Aaron Turner
>> https://synfin.net/ Twitter: @synfinatic
>> My father once told me that respect for the truth comes close to being
>> the basis for all morality.  "Something cannot emerge from nothing,"
>> he said.  This is profound thinking if you understand how unstable
>> "the truth" can be.  -- Frank Herbert, Dune
>>
>>
>> On Fri, Sep 29, 2017 at 2:01 PM, xpro6000  wrote:
>> > I have multiple IPs on my Linux system and I need one of my programs to
>> > be
>> > able to choose which IP to use. One way to achieve this is to use a
>> > proxy
>> > server. But with Squid's default config file, the IP I connect to, is
>> > not
>> > the IP used for the outgoing connection.
>> >
>> > Is there anything I can do to enable Squid to use the same incoming IP
>> > for
>> > the outgoing IP?
>> >
>> > ___
>> > squid-users mailing list
>> > squid-users@lists.squid-cache.org
>> > http://lists.squid-cache.org/listinfo/squid-users
>> >
>
>
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-09-29 Thread xpro6000
The program is multithreaded so the process based routing won't work. There
is no simple way to make Squid use the connecting IP for the outgoing IP?

On Fri, Sep 29, 2017 at 6:37 PM, Aaron Turner  wrote:

> If you don't need a proxy server for other reasons, there are better
> ways.  Example, per-process routing:
>
> http://www.evolware.org/?p=369
>
> Or if you have control over the source code of the software,
> setsockopt() will do it for you as well.
> --
> Aaron Turner
> https://synfin.net/ Twitter: @synfinatic
> My father once told me that respect for the truth comes close to being
> the basis for all morality.  "Something cannot emerge from nothing,"
> he said.  This is profound thinking if you understand how unstable
> "the truth" can be.  -- Frank Herbert, Dune
>
>
> On Fri, Sep 29, 2017 at 2:01 PM, xpro6000  wrote:
> > I have multiple IPs on my Linux system and I need one of my programs to
> be
> > able to choose which IP to use. One way to achieve this is to use a proxy
> > server. But with Squid's default config file, the IP I connect to, is not
> > the IP used for the outgoing connection.
> >
> > Is there anything I can do to enable Squid to use the same incoming IP
> for
> > the outgoing IP?
> >
> > ___
> > squid-users mailing list
> > squid-users@lists.squid-cache.org
> > http://lists.squid-cache.org/listinfo/squid-users
> >
>
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Make all IPv6 ips on system to be used as a proxy

2017-09-29 Thread Aaron Turner
If you don't need a proxy server for other reasons, there are better
ways.  Example, per-process routing:

http://www.evolware.org/?p=369

Or if you have control over the source code of the software,
setsockopt() will do it for you as well.
--
Aaron Turner
https://synfin.net/ Twitter: @synfinatic
My father once told me that respect for the truth comes close to being
the basis for all morality.  "Something cannot emerge from nothing,"
he said.  This is profound thinking if you understand how unstable
"the truth" can be.  -- Frank Herbert, Dune


On Fri, Sep 29, 2017 at 2:01 PM, xpro6000  wrote:
> I have multiple IPs on my Linux system and I need one of my programs to be
> able to choose which IP to use. One way to achieve this is to use a proxy
> server. But with Squid's default config file, the IP I connect to, is not
> the IP used for the outgoing connection.
>
> Is there anything I can do to enable Squid to use the same incoming IP for
> the outgoing IP?
>
> ___
> squid-users mailing list
> squid-users@lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users