I exposed web-service on my local machine to the external IP via Mikrotik and can access it via MY_EXTERNAL_IP:5000
.
But my nginx-server can't access to MY_EXTERNAL_IP:5000
.
Logs:
14:09:53 firewall,info dstnat: in:bridge out:(none), src-mac 60:03:08:8c:a7:30, proto TCP (SYN), 192.168.1.19:50135->MY_EXTERNAL_IP:5000, len 64
14:09:55 firewall,info input: in:ether1 out:(none), src-mac 04:62:73:a2:55:49, proto TCP (SYN), 188.196.62.73:47850->MY_EXTERNAL_IP:5000, len 60
Nginx error log:
[error] 2048#0: *434 connect() failed (111: Connection refused) while connecting to upstream, client: MY_EXTERNAL_IP, server: MY_DOMAIN.com, request: "GET / HTTP/1.1", upstream: "http://MY_EXTERNAL_IP:5000/", host: "MY_DOMAIN.com"
Why the nginx-server can't access to MY_EXTERNAL_IP:5000
(It causes 502 error), otherwise I can from browser?
I suppose I need an additional Firewall Filter rule. Which one?