Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Martin Metzker <martinmetzker@gmx.net>
To: netfilter@lists.netfilter.org
Subject: change destination port
Date: Wed, 23 Aug 2006 22:39:07 +0200	[thread overview]
Message-ID: <44ECBCEB.3080700@gmx.net> (raw)

hello world!

i need to modify the dport of a locally generated packet.
i want an ipsec tunnel between my router here (dynamic ip) and a box 
behind a cisco pix firewall (static ip). the problem is that the pix is 
an ipsec endpoint as well so forwarding port 500 on the pix is a bad 
idea. the nat traversal option only encapsulates esp packets so i have 
to make ike work by myself.
the idea is to change the dport from 500 to some other port, say 2000. 
as far as i can tell openswan does not support that, so i was/am hoping 
i can use iptables to change the dport on packets leaving my box with 
destination X.X.X.X.

iptables -A OUTPUT -t nat -p tcp -d X.X.X.X --dport 500 -J DNAT 
--to-destination X.X.X.X:2000
doesn't do the trick. in fact locally generated outbound ike packets 
don't seem to care about OUTPUT on table nat. the postrouting chain does 
not support target DNAT so i'm about to believe i can't do it.

this mailing list is sort of my last hope. if i can't find help here i 
might have to start cross compiling :-(

thanks in advance

martin


                 reply	other threads:[~2006-08-23 20:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44ECBCEB.3080700@gmx.net \
    --to=martinmetzker@gmx.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox