A few days ago I installed confluence. This service listens to 8090 port by default. But I don't like to give customer IP: port for connection, so I decide to do some re-routing. The easiest way to re-route incoming traffic from one port to another is using the xinetd service.

yum -y install xinetd
chkconfig xinetd on

In /etc/xinetd.d I create a file confluence with this content:

service confluence {
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
user = root
wait = no
port = 80
redirect = 127.0.0.1 8090
log_type = FILE /tmp/confluence.log
}

This will re-route all traffic from port 80 to 8090, so I will give customers just the IP address of my service