From: Aleksander <aleksander@krediidiinfo.ee>
To: netfilter@lists.netfilter.org
Subject: Re: Redirecting packets based on source+destination ip's
Date: Mon, 10 Apr 2006 17:04:13 +0300 [thread overview]
Message-ID: <443A65DD.6050607@krediidiinfo.ee> (raw)
In-Reply-To: <4840.68.94.225.167.1144557277.squirrel@webmail.dominationtime.com>
clan@dominationtime.com wrote:
> To make it work I had to change PREROUTING to OUTPUT. So is there a way
> for that to only effect certain source ip's?
If the packet originated from localhost, then OUTPUT is correct. -s is
source and -d is destination ip.
iptables -t nat -A OUTPUT -s 3.3.3.3 -d 1.1.1.1 -p tcp -m tcp --dport 80
-j DNAT --to 2.2.2.2
Should work for you. Remove your previously inserted rule first though.
Please read the manual page of iptables and/or
http://iptables-tutorial.frozentux.net/iptables-tutorial.html
HTH,
Alex
prev parent reply other threads:[~2006-04-10 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-09 4:34 Redirecting packets based on source+destination ip's clan
2006-04-10 14:04 ` Aleksander [this message]
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=443A65DD.6050607@krediidiinfo.ee \
--to=aleksander@krediidiinfo.ee \
--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.