Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

is there a way to redirect all non local http requests that through my computer to use my transparent proxy, so i can log all websites are they visiting?

and if possible all https requests too..

my computer was used as NAT server because we only have 1 real IP..

eth1 = w.x.y.z (real/public IP)
eth0 = a.b.c.d (fake/private IP)

my transparent proxy listen on localhost:3128

all computers in my home connected to eth0 to access the internet..

share|improve this question

1 Answer 1

Assuming that you want only to redirect traffic coming from eth0, not from localhost, and that your transparent proxy is running on your NAT server, you can do this for HTTP traffic with:

iptables -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 3128

As HTTPS uses end-to-end encryption, you cannot log specific requests without modifications on the client side - otherwise man-in-the-middle attacks would be easy.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.