There is a function using TCP pass through like this:
stream {
upstream web_server {
# the site to be visited is https://whatismyip.com, below is its real address
server 104.27.194.88:443;
}
server {
listen 443;
ssl_preread on;
proxy_pass web_server;
}
}
Therefore, if I type the public IP address of that nginx server after "https://" on my browser, given all the firewalls allowed, can I in fact reach the target site?
Actually what I got is whether to allow the ssl certificate from nginx server, then allowed, but got 403 forbidden by cloudflare.
If something went wrong, how to improve? Thanks.
First you need to change in your
hosts
file (or your DNS if you have access to your DNS server configuration) and add an entry similar with:Or for DNS:
Where
192.168.1.10
is the IP where Nginx is listening. In the browser use https://whatismyip.com and don't connect with the IP.The config should use a hostname, because the whatismyip.com's IP address might change: