I have several app servers in AWS/EC2, where customers may use their LDAP implementations to authentication into our product.
Some of our customers cannot whitelist us by FQDN.
The app servers will be using iptables/NAT to send that LDAP traffic (port varies by customer) to a 'proxy machine' which should then forward that traffic out to it's destination.
iptables -t nat -A OUTPUT -p tcp --dport 389 -j DNAT --to-destination x.x.x.x:3128 iptables -A FORWARD -p tcp -d x.x.x.x --dport 3128 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT As you might have guessed by the port - initially this proxy had Squid installed. I could verify via tcpdump that LDAP traffic was getting to that box on that port, but Squid would never pick up on it or do anything with it.
Failing to find any working examples online, I've moved to HAProxy - largely to a similar result. I also can't find any documentation of HAProxy being used in this manner - with most of it largely being a reverse proxy, or a load balancer.
I've explored setting up a iptables based router as well, but AWS is preventing public IPs on machines with 2 Ethernet interfaces.