Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 13765604d51f6336069c3e8a1834b4cb > files > 129

dovecot-1.0.7-8.el5_9.1.x86_64.rpm

Listening on additional ports
=============================

Here's a little trick to get servers to listen on additional ports. This can be
used for SMTP as well or any other protocol.

with Linux
==========

This requires netfilter compiled into the kernel or loaded as module and the
user-space iptables command:

---%<-------------------------------------------------------------------------
iptables -v -t nat -A PREROUTING -p tcp -j REDIRECT --dport 109 --to-ports 110
---%<-------------------------------------------------------------------------

using socat
===========

You can achieve the same result:

---%<-------------------------------------------------------------------------
socat tcp4-listen:109,setuid=nobody,fork,reuseaddr
tcp4-connect:localhost:110,bind=localhost&
---%<-------------------------------------------------------------------------

(This file was created from the wiki on 2007-06-15 04:42)