1

I have a service that listens to 127.0.0.1:15750 and would like to make that service listen to 0.0.0.0:15750 using just UFW (or iptables if not possible with UFW).

Basically listen same port (or not if impossible otherwise) and forward to the service.

Unfortunately, in my case it's not possible to change the service itself to listen to 0.0.0.0.

1
  • I can change the port but not the bind/listening address. It's a custom compiled program provided by a 3rd party, unfortunately it's a strict requirement.
    – Sev
    Commented Sep 18, 2018 at 22:35

1 Answer 1

2

Try using netcat or socat.

The original netcat.
nc -l -p 15751 -c "nc 127.0.0.1 15750"

If that doesn't work for you use the full netcat command. It has different syntax, but you should be able to use it.

Use this link as a reference:

https://www.xinotes.net/notes/note/1529/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .