S
S
Sergey2017-09-04 12:55:59
Python
Sergey, 2017-09-04 12:55:59

Redirect http|https. Internet=Intranet (1 IP:PORT) and Intranet=Internet?

There is a desire to put the Internet (VPN-client) on the Intranet to view sites.
A single computer (IP:PORT) can be accessed via an external VPN server (172.16.0.1).
There are several http/https servers on the Intranet that need to be browsed.
- Because IP:PORT are the only ones, it is logical to do server navigation by adding "path" in the address bar (location+proxy_pass in terms of ngnix) - http://IP:PORT/
gonafig nginx.
And if the pages are "dynamic" (I don't know what exactly they are called), for example, webmin, web pages of routers (some), etc. If such a "server" is the only one on the network, then in nginx - "location / + proxy_pass", and if there are several.
- The next experiment is to "reverse squid3"+jesred (3.0) (all examples about squidguard are cutting banners, so I haven't "poked around" yet. And in general, all examples of redirects are replacing several "gif" with one "gif")
I.e. .

squid.conf
http_port 192.168.1.16:8083 intercept
redirect_program /usr/lib/squid/jesred

regex
^http:\/\/192.168.1.16/router 192.168.1.1
regex ^https:\/\/192.168.1.16/webmin https://192.168.1.16:9091
regex ^http:\/\/192.168 .1.16/webmin 192.168.1.16:9091
regex ^http:\/\/192.168.1.16/trans 192.168.1.16:9092
It's also kind of "dirty". Simple static pages - correct, a little more complicated (js / php?) - with errors (structure, frames) https (not at all) - the same webmin.
At the same time "directly" (192.16.1.16:9091 192.16.1.16:9092) without problems.
- Maybe there are simpler "redirect" solutions? With, even in English, examples. Naturally, no caching is needed; squid, IMHO, is redundant.
Everything "costs" almost on Debian.
(It's too early to bother with iptables and other security.)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2019-05-15
@smi33

because at the beginning of the line there are spaces instead of tabs (or tabs instead of spaces).

A
abbrakadabbra, 2019-05-15
@abbrakadabbra

Learn to read the exps that you get. Your efficiency will increase significantly (you can immediately go to the search with the message and understand the reason. And there will be fewer super-childish questions on the toaster.
I repeat: read what the interpreter spits out for you. This is important!
Learn Traceback in Python from the very last line and up, by calls Look at the line number, the method, the point where the error occurred, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question