M
M
mitaichik2015-05-07 16:17:02
linux
mitaichik, 2015-05-07 16:17:02

How to forward port 25 to another in Ubuntu?

There is a program that should listen to port 25 (smtp), but in order for it to be able to bind to it, it needs to be run as root, which I cannot afford. People write that you need to hang it on another port, for example 2525 and forward it from port 25. This is done somehow using iptables/ipfw but I just can't figure out how to do it. Tell me, please)
And yet - there are several addresses on the server, you need to configure only for one of them.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
ldv, 2015-05-07
@mitaichik

iptables -t nat -A PREROUTING -p tcp -m tcp --dport 25 -j REDIRECT --to-ports 2525

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question