On Wednesday 29 May 2002 6:13 pm, Mark Atwood wrote:

> Is there a way to have a daemon listening on say, port 222, and use
> iptables such that if some peer connects to say, port 333, the
> connection will be sent to the daemon on 222?

iptables -A PREROUTING -t nat -p tcp -d a.b.c.d --dport 333
         -j DNAT --to a.b.c.d:222

where a.b.c.d is the address of the server (this could be the machine 
iptables is running on, or it could be a machine which is routed through the 
iptables box).

Change tcp for udp if that's the protocol you need.



Antony.

Reply via email to