|
Hi David - At 13:59 12/23/2006, David Gibbs wrote:
iptables -t nat -A PREROUTING --dst 69.3.23.28 -p tcp --dport 80 -j DNAT --to-destination 69.3.23.28:5222
To do a port forward to the same system, use -j REDIRECT rather than -j DNAT, e.g. -j REDIRECT --to-ports 5222
Note that REDIRECT ignores the destination address. It redirects the packet to the specified port(s) on the local system whether the packet was originally destined for the local system or not.
That said, I'm not an iptables guru either, nor have I used REDIRECT, but I think it's what you need.
Ken
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.