Welcome! Log In Create A New Profile

Advanced

Trouble using nginx tcp proxy

Swaraj Banerjee
November 04, 2016 04:52AM
Hi all, I'm having some trouble using NGINX as a TCP proxy connecting to a
customer's servers over an IPSec VPN.
My setup:- 1 EC2 instance with NGINX plus configured as TCP proxy- 1 EC2
instance in same VPC running Openswan VPN- IPSec VPN with customer that is
configured to only respond to requests from my proxy EC2 instance's public IP
A visual of my setup is here:
https://s3-us-west-1.amazonaws.com/static.semprehealth.com/nginx_stream.jpg

My nginx config on proxy instance:user nginx;worker_processes auto;
error_log /var/log/nginx/error.log debug;pid /var/run/nginx.pid;
events {    worker_connections 1024;}
stream { upstream coupon_processors {  least_conn;  server 170.138.33.30:49841;
 }
server {  listen 49841;  proxy_pass coupon_processors; }}

Problem:When I'm on proxy instance, I can send data over TCP to my customer's
servers (170.138.33.30:49841). When I try to send data from another box, via the
proxy, I don't see data returned.
These are the error logs:2016/11/04 08:49:38 [info] 16345#16345: *5 client
<MY_IP>:49263 connected to 0.0.0.0:498412016/11/04 08:49:38 [info] 16345#16345:
*5 proxy 5.5.0.53:26726 connected to 170.138.33.30:498412016/11/04 08:49:38
[info] 16345#16345: *5 client disconnected, bytes from/to client:105/0, bytes
from/to upstream:0/105
Any reason why I can send data, but don't receive anything back?
Thanks,Swaraj_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Trouble using nginx tcp proxy

Swaraj Banerjee November 04, 2016 04:52AM

Re: Trouble using nginx tcp proxy

suman mohanty September 20, 2018 03:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 287
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready