Linux Netfilter discussions
 help / color / mirror / Atom feed
From: mdew <mdew@orcon.net.nz>
To: netfilter <netfilter@lists.netfilter.org>
Subject: DNAT/SNAT stuff
Date: 08 May 2003 21:39:22 +1200	[thread overview]
Message-ID: <1052386761.5804.5.camel@mdew> (raw)



current setup, 

$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p tcp --dport
4661 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p tcp --dport
4662 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p tcp --sport 4661
-j SNAT --to 210.54.175.12
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p tcp --sport 4662
-j SNAT --to 210.54.175.12
$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p udp --dport
4665 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.54.175.12 -p udp --dport
4672 -j DNAT --to 10.0.0.3
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p udp --sport 4665
-j SNAT --to 210.54.175.12
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.0.0.3 -p udp --sport 4672
-j SNAT --to 210.54.175.12

i would like specify 10.0.0.x instead of 10.0.0.3, how is this done?

and some problems i had attempting it..

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.6a: Bad IP address `10.0.0.0/24'
iptables v1.2.6a: host/network `10.0.0.3-10.0.0.8' not found
Try `iptables -h' or 'iptables --help' for more information.

cc: please :)
-- 
mdew <mdew@orcon.net.nz>



             reply	other threads:[~2003-05-08  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-08  9:39 mdew [this message]
2003-05-11  9:20 ` DNAT/SNAT stuff Francois LE BOURDELLES
2003-05-11 23:27   ` P.Italiaander
2003-05-11 15:56 ` Francois LE BOURDELLES

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=1052386761.5804.5.camel@mdew \
    --to=mdew@orcon.net.nz \
    --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