I have to collect data from a number (>1000) of devices whose only authentication/authorization is via the source IP address connecting to them. These are network devices whose configuration is relatively static, so changing it regularly or in some automated fashion isn't a feasible solution.
I've been working with my load balancing team to try to send all of the traffic from my hosts through the load balancer, but so far our (not working/feasible) solution involves an iptables rule to do NAT on the host running the collector software to route traffic to the load balancer. The problem is that because it's doing NAT, the destination address gets rewritten, so the load balancer has no idea of what the real destination IP should be.
The command I used was this:
iptables -t nat -A OUTPUT -p tcp --dport <port> -j DNAT —to-destination <ip>:<port>
I'm not familiar enough with iptables/iproute2 to know what exactly to do in this situation. I feel like this is probably pretty easy to do with a tunnel of some sort, but I'm hoping for a solution where the load balancer configuration can be static and we can spin up collector hosts and just run some command to route the traffic accordingly.
This definitely isn't my area of expertise and I've probably left out some information so please let me know if there's more info that you need to know. Thanks for any help anyone can provide.