Nicolas
----- Original Message ----- From: "Sertys" <sertys@xxxxxxxxxxxxxx>
To: "Netfilter list" <netfilter@xxxxxxxxxxxxxxxxxxx>
Sent: Monday, March 21, 2005 5:00 PM
Subject: Re: Altering a packet's port
On Mon, 21 Mar 2005 15:43:44 -0500, Nicolas Ross <rossnick-lists@xxxxxxxxxxx> wrote:
What I want to do, is that if a packet originites from the local net (192.168.7.x) on tcp port 22, that the final destination of the packet would wtill be the same host, but on port 8022...
(...)
Redirect works on local hooks. Just DNAT it, dude. iptables -t nat -A PREROUTING -p tcp -s 192.168.x.x --dport 22 -j DNAT --to-destination f.g.h.i:8022
It's crucial to define dport, not sport, cause your sport is not 22, it's a client port > 1024 and random.