iptables: can't set any ip address in rules
Sascha Reissner
sascha.reissner at toxicnet.de
Wed Sep 7 10:42:21 CEST 2005
Please add a protocol to your rules (-p TCP or -p UDP) and it will work.
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 at askey.com.tw>
> To: <netfilter at 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
>
>
>
More information about the netfilter
mailing list