Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Sascha Reissner <sascha.reissner@toxicnet.de>
To: Salim <salim.si@askey.com.tw>
Cc: netfilter@lists.netfilter.org
Subject: Re: iptables: can't set any ip address in rules
Date: Wed, 07 Sep 2005 10:43:46 +0200	[thread overview]
Message-ID: <431EA842.2050502@toxicnet.de> (raw)
In-Reply-To: <017c01c5b385$3f7bfe00$205f030a@askeyrd3>

Argh, i mean please add a protocol to the rule, and add the nat table to 
the rule.. you always use -t but you do not specify the nat table.. in 
your rules "-t" should be replaced with "-t nat"

regards,
sascha

Salim wrote:
> this issue has been solved. seems like 'unsigned long long' doesn't work on
> my system. changed 'strtoull' to 'strtoul'. Now it looks okay.
> thanks for all who have spent time on my question.
> 
> ----- Original Message -----
> From: "Salim" <salim.si@askey.com.tw>
> To: <netfilter@lists.netfilter.org>
> Sent: Monday, September 05, 2005 2:01 PM
> Subject: iptables: can't set any ip address in rules
> 
> 
> Hello all,
>     I am not able to set any rule that contsin ip address in the iptables.
> For example I give this command
> 
> 
>>iptables -t -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2
> 
> 
> then, I issue the command >iptables -t nat -L.
> 
> the result is
> 
> Chain POSTROUTING (policy ACCEPT)
> target           DNAT
> prot              all
> opt                --
> source          anywhere
> destination    0.0.0.0   to:0.0.0.0
> 
> 
> I gave the command with verbose
> 
>>iptables -v -t -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2
> 
> 
> it showed
> DNAT all opt -- in * out * 0.0.0.0/0 -> 0.0.0.0 to:0.0.0.0
> 
> 
> for any command which has an ipaddress, the ip address always is always
> takes as 0.0.0.0
> 
> I am using Redhat Linux 2.4.25
> iptables v1.3.3
> MIPS embedded system.
> 
> I am confused. Any help will be greatly appreciated.
> 
> regards
> Salim
> 
> 
> 



  parent reply	other threads:[~2005-09-07  8:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-05  6:01 iptables: can't set any ip address in rules Salim
2005-09-05  6:33 ` Rob Sterenborg
2005-09-05  6:53   ` Salim
2005-09-07  7:36 ` Salim
2005-09-07  8:42   ` Sascha Reissner
2005-09-07  8:46     ` Rob Sterenborg
2005-09-07  8:43   ` Sascha Reissner [this message]
2005-09-07  9:10     ` Salim

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=431EA842.2050502@toxicnet.de \
    --to=sascha.reissner@toxicnet.de \
    --cc=netfilter@lists.netfilter.org \
    --cc=salim.si@askey.com.tw \
    /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