NGINX reverse proxy not forwarding the request hostname to docker container


We’ve setup a docker container running on port 3002 and then configured port 3002 to /path/ on my domain There’s an express rest api is running on 3002 port container which outputs the req.hostname and when I make a request from let’s say, the consoled value of req.hostname is shown to be instead of

Nginx Conf

server {
    listen 443 ssl;
    ssl_certificate /etc/ssl/__abc.crt;
    ssl_certificate_key /etc/ssl/abc.key;

    listen 80 default_server;
    listen [::]:80 default_server;
    location  / {
        proxy_pass http://localhost:3001/;
        proxy_set_header Host $host;
    location /path/ {
        proxy_pass http://localhost:3002/;
        proxy_set_header Host $http_host;

What changes do I have to make so I can get the in consoled value?

networking – Port Forwarding Ubuntu to Debian server

I have xxx Ubuntu 18.4 Desktop which is connected to the Internet and have a Debian Server which is not connected to the Internet directly but hosting a cacti server on the same network with different private IP block and reachable vice-versa.

I want xxx server to have access to the cacti server like browsing public IP of xxx PC from windows client with 8000 ports, requests would be forwarded to yyy server and responding back as well.

Note that I have full administrative access to xxx server but yyy server is reachable but don’t have administrative access.

Inside the office network, I can reach yyy server from xxx server without any issue.
But from outside I can reach xxx server – can do ssh but with the terminal, I can’t see the cacti graph.

Tried googling it and it ends up with multiple failed attempts – tried with IP Tables, tired to ssh but unable to find a solution.

How to achieve this basic requirement? Any help/suggestions would be much appreciated.

router – port forwarding doesn’t work

I’m trying to open a port to play a game with my friend and it’s not working…So, there’s a problem that when I try to scan ports on my public IP address (with some online port scanner) it shows no result for any ports…

Screenshot of router port forward settings:

Screenshot of my unlucky:

How could you use mirror in unity to network across multiple networks rather than only LAN (Port Forwarding?)

I’ve been working on a game for my friends and I to play during quarantine but I can’t figure out or find any information on networking using mirror. Everything I see gives vague answers to even vaguer questions that assume you have prior knowledge of networking. Could anyone give me any sort of direction on how to port forward using mirror or if there’s a better solution?

email: HAProxy mail forwarding rules

I use HAProxy as a mail interface (IMAPS) in SSL termination mode (mail clients configured for imap server (haproxy host)).


frontend ft_imaps
    mode tcp
    bind ssl crt /etc/pki/tls/certs/cert.pem
    default_backend bk_imaps2
    log global
    timeout client 1m
    option tcplog

backend bk_imaps
      mode tcp
      log global
      option tcplog
      timeout server 1m
      timeout connect 30s
      server SRV1 check maxconn 20 ssl verify none

All good if all virtual domains are served by server But if I want to route mail traffic to the virtual domain & # 39; domain1.local & # 39; to and & # 39; domain2.local & # 39; – to another (eg how can I filter this on HAProxy?

As for me, it is impossible, because HAProxy cannot analyze to which virtual domain each email. In configuration.txt:
The tcp mode is for SSL, SSH, SMTP. And in tcp mode "no layer 7 exam will be performed." Therefore, SMTP headers are not accessed in tcp mode.

So if I need to use a point for mail traffic, I can try acl based on src (client IP address) or make various interfaces (: 1994 -> ,: 1995 -> and configure the software mail client?

& # 39; mode http & # 39; not suitable for this?

iptables: routing (forwarding) of all traffic based on source / destination (Linux / CentOS)

I have an active-active Linux router (running CentOS) with three interfaces (ens100, ens101, ens102). I use iptables to route traffic.

My problem is with the connections between "Server A" and "Server B". I cannot ping "Server B" from "Server A" but I can ping "Server B" from the "Linux router". I can also see that there are packages coming from "Server B" to "Server A" through the ens100 interface "Linux Router"

I think this is because "Server B" has a default gateway on "Switch A", therefore traffic from "Server B" is routed through "Switch A", "Switch B" and finally through the "Linux Router". But because "Linux Router" has an interface on the same network as "Server B", all traffic destined from "Server A" to "Server B" will bypass "Switch B" and "Switch A" routing. That seems to slow things down.

I would like to do some kind of conditional forwarding or policy-based routing on "Linux Router" so that traffic coming from "Server A" at is routed / forwarded to "Switch B", ie via ens100 and not through ens102 (default route interface for network in "Linux-Router).

Network Scheme

postfix – How does Virtualmin do email forwarding?

I'm confused: when I add forwarding to an existing email address in Virtualmin (6.08, Centos 7), it doesn't modify the / etc / postfix / virtual file or any other files in / etc / that I can see. When I search for the forwarding email address, it doesn't appear anywhere what can i find

How does Virtualmin do forwarding if you don't modify Postfix settings?

enter the image description here

networks: external host for port forwarding?

I have managed port forwarding before with a Factorio server, I am currently trying to get a Minecraft server up and running. The use of my external IP has not given results, what do I need to put for "external host" here? I know the internal host is for my machine's port and local IP. I am not a network engineer or IT specialist, so much of the language is foreign to me. I previously did this on a completely different router, the sagemcom F @ st5260 is what I'm working with right now. I have a Linksys that I can also connect to, but I'm pretty sure it's a problem with the external host.

enter the image description here

remote desktop: configure Remmina or other GUI control application via ssh without X forwarding

Due to the COVID-19 crisis, I only have access to my job computer via ssh (so I have no physical access). Since I connect to this computer through another that does not allow X forwarding, I can't forward X.

Now I need to control an application that does not allow me to do it simply using the terminal.

The best option I can think of is to use Remmina, but I need to be able to start and configure remotely via ssh.

Every time I try to start Remmina via ssh, an error occurs due to unavailability of X forwarding.

networks: if port forwarding does not allow the same internet protocol to run simultaneously on multiple hosts, how do you do this?

According to a related post, it is not possible for port forwarding to serve multiple hosts simultaneously using the same Internet service / application / protocol since each Internet service has a dedicated port set by IANA. Therefore, with port forwarding alone, it is not possible for multiple hosts on an internal network to use the same Internet service simultaneously OR even for multiple instances of the same Internet application running on a single host machine. However, observation would suggest that concurrent support for multiple instances of an internet service within the same internal network is possible.

How is this explained in practice?