Trouble using nginx tcp proxy

Swaraj Banerjee swaraj at
Fri Nov 4 08:50:37 UTC 2016

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:

My nginx config on proxy instance:user nginx;worker_processes auto;
error_log /var/log/nginx/error.log debug;pid /var/run/;
events {    worker_connections 1024;}
stream { upstream coupon_processors {  least_conn;  server;
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 ( 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 08:49:38 [info] 16345#16345:
*5 proxy connected to 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list