[tproxy] TPROXY on ubuntu not working.
Firas Rasmy
firasrasmy at yahoo.com
Tue Aug 27 12:03:33 CEST 2013
Hi Yash,
________________________________
From: yash cp <yashavanth.hsn at gmail.com>
To: Firas Rasmy <firasrasmy at yahoo.com>
Cc: "tproxy at lists.balabit.hu" <tproxy at lists.balabit.hu>
Sent: Tuesday, August 27, 2013 9:05 AM
Subject: Re: [tproxy] TPROXY on ubuntu not working.
>Hello Firas,
>Thanks for your quick reply.
>>1. What do you mean by "Real"?
> Even though its an private IP address, it uses DHCP for getting the IP address.( Its not static or aliased) I am able to access the Internet from the >proxy machine.
I don't think this is called "real".
>>2.By (Interface to the Internet), I suppose you mean that this private IP address will be NATed at another network device after the TPROXY. How about subnet 192.168.22.0/24? Is it NATed ? Why are you using two IP addresses on the TPROXY?
>Yes, its NATed after TPROXY. 192.168.22.0/24 is not NATed.
>I am using two IP addresses, because I want to create a local network behind 192.168.150.10 machine. I suppose, without two IP addresses I cannot create a subnet. Please correct me if I am wrong.
Please note that TPROXY spoofs the IP addresses of its clients, so if the IP address of the client is neither public nor NATed, how would requests reach the intended web server? Since your clients have private IP addresses, perhaps you don't need a TPROXY in your case as one of the goals of TPROXY is maintaining the (I would say "public", though not necessarily) IP addresss of the client on the connection with the web server. So I think an interception proxy would be sufficient in your case.
You mean you have two subnets behind the TPROXY? If this is the case then having two IP addresses on the interface is one way of doing that, but may not be the best way. I would suggest that you start with a simple topology (single subnet in your case). Once you have everything working properly, you may take it a step further.
>> 3.The TPROXY will spoof the IP addresses of clients on 192.168.22.0/24 subnet and I think (but I'm not sure) that TPROXY would send SYN-ACK to the original client, only after it receives SYN-ACK from the web
server. Since this subnet is private, requests will not reach the web
server unless you're doing NAT somewhere after the TPROXY. Please note
that even if you're doing NAT, you must make sure that replies return
back to the TPROXY rather than the original client.
I verified that what I said in my previous email "TPROXY would send SYN-ACK to the original client, only after it receives SYN-ACK from the web server" is wrong, sorry for this! I tested it on my working TPROXY squid server and found out that squid immediately sends SYN-ACK to the client once it receives a SYN, even for destination IP addresses that are not listening to TCP port 80!
>Well, I checked with my setup. After the SYN packet from the client is received. The TPROXY machine never responds to the original client or even never tries to send the SYN packet to the web server.
>Without using TPROXY, my setup with Iptables REDIRECT works fine.
I would suggest using tcpdump and analyzing the traffic you capture to see what's really going on.
>4. I don't know about the internals of the TPROXY. Does it works with matching using IP address and port or with MAC address.
>I could not get your question here!
>What I meant here is, how does the TPROXY matches the packets. Since I am using the same MAC address for both the IP's. Will that be a problem?
If I understood you correctly, I don't think that using two IP addresses on one interface would conflict with how TPROXY works!
Regards,
Firas
>Best Regards,
>Yash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/tproxy/attachments/20130827/f8b6d0b4/attachment.htm
More information about the tproxy
mailing list