0

For development reasons I want to connect my local machine (macos) to a remote private network of a kafka/zookeeper cluster.

When I do port forwarding with

ssh root@000.000.000.000 -N -L 10.0.0.8:9092:10.0.0.8:9092

my mac is not doing this (probably for security reasons) and states "Could not request local forwarding."

If I just put it on localhost:9029 the kafka-broker can't find the other nodes within the private network because of the broker meta data pointing to the private network.

I also thought about running a local haproxy on 10.0.0.8 and proxy tcp traffic to localhost on different ports, but no chance. It states "Cannot bind socket [10.0.0.8:9092]"

How could I get 10.0.0.8:9029 on my local machine pointing to a forwarded port on the remote?

Jurudocs
  • 339
  • 1
  • 3
  • 11

1 Answers1

0

In linux, something like this could be achieved with iptables, I'm not sure about mac though. What you're really wanting to look into is something like Network Address Translation, or NAT. Another option is a proxy. NAT is likely your easiest route.

Could you provide more details on your network topology? Do you have control of the Kafka network?

Oxymoron
  • 340
  • 3
  • 12