Trouble using nginx tcp proxy

Swaraj Banerjee swaraj at semprehealth.com
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:
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161104/cd011441/attachment.html>


More information about the nginx mailing list