A
A
Anhel7892015-03-20 20:55:04
iptables
Anhel789, 2015-03-20 20:55:04

How to forward a site past squid in iptables?

Hey!
Before, I let separate computers into the Internet past squid.
Forwarded ports.
And then the task arose, so that the computers went to the site gmail.com past squid.
The fact is that all HTTPS sites go through squid, and gmail.com does not want to!
So I want to forward it past the proxy. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Evseev, 2015-03-21
@IlyaEvseev

More or less like this:

iptables -t nat -N to_squid
iptables -t nat -A PREROUTING -p tcp --dport 80 -j to_squid
for a in $(host -t a gmail.com | awk '/has address/ {print $4;}'); do
    iptables -t nat -A to_squid -j return
done
iptables -t nat -A to_squid --redirect --to-port 3128

A
Alexander, 2015-03-21
@yakupovak

What is the end goal?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question