Answer the question
In order to leave comments, you need to log in
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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question