Trouble using nginx tcp proxy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble using nginx tcp proxy

Swaraj Banerjee
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:49841
2016/11/04 08:49:38 [info] 16345#16345: *5 proxy 5.5.0.53:26726 connected to 170.138.33.30:49841
2016/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
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Trouble using nginx tcp proxy

wld75
Hi Swaraj,

I have also same setup.

and getting same error messgae .

Could you please help me to resolve this issue

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,270754,281326#msg-281326

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx