L
L
Lev Fedorov2019-12-04 22:49:03
Computer networks
Lev Fedorov, 2019-12-04 22:49:03

How to raise a transparent proxy?

There is a machine with Ubuntu. It should be in the role of a mirror, that is, a domain is attached to it, and when accessing a site using this domain, it should give the contents of the site on another domain.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2019-12-04
@blvckheart0

Take any manual on the hospot, you will find everything you need. It can be done through a transparent proxy on squid, it can be done on pure iptables.
If the IP of the site is known, and it is the only one on this IP, then:
Provided that the locale goes to the Internet through your network card eth0, and you placed the substitution on 192.168.0.1:80
and all.
Same thing with squid.
You can also redirect port 443, but if the site has https, then the user will not see the site until he accepts an untrusted certificate.
BUT, if you need to stupidly redirect:
then why would you not do a htaccess redirect?

RewriteEngine On
RewriteCond %{HTTP_HOST} old-site.ru
RewriteRule (.*) http://new-site.ru/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question