From: "Nicolas Ross" <rossnick-lists@cybercat.ca>
To: Netfilter list <netfilter@lists.netfilter.org>
Subject: Re: Altering a packet's port
Date: Mon, 21 Mar 2005 20:27:07 -0500 [thread overview]
Message-ID: <002201c52e7e$4fe76950$6500a8c0@DEFIANT> (raw)
In-Reply-To: opsn0cqeu476nf2y@xonix
I saw that in the man page, but I need to do this for ALL hosts to specific
subnets, and many hosts. So I'll have to define one rule for EACH host I
need a redirect (something like 50 to 75) ?
Nicolas
----- Original Message -----
From: "Sertys" <sertys@supportivo.org>
To: "Netfilter list" <netfilter@lists.netfilter.org>
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@cybercat.ca> 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.
next prev parent reply other threads:[~2005-03-22 1:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 20:43 Altering a packet's port Nicolas Ross
2005-03-21 22:00 ` Sertys
2005-03-22 1:27 ` Nicolas Ross [this message]
2005-03-22 11:29 ` Jason Opperisano
2005-03-22 14:42 ` Nicolas Ross
2005-03-22 14:59 ` R. DuFresne
2005-03-22 15:12 ` R. DuFresne
2005-03-22 15:15 ` Nicolas Ross
2005-03-22 18:18 ` Toby
2005-03-22 18:29 ` Toby
2005-03-22 18:49 ` Nicolas Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002201c52e7e$4fe76950$6500a8c0@DEFIANT' \
--to=rossnick-lists@cybercat.ca \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.