Linux Netfilter discussions
 help / color / mirror / Atom feed
* iptables -t nat -A OUTPUT - j DNAT
@ 2003-05-23 14:41 Leszek Żur
  2003-05-23 15:05 ` Cedric Blancher
  0 siblings, 1 reply; 3+ messages in thread
From: Leszek Żur @ 2003-05-23 14:41 UTC (permalink / raw)
  To: netfilter

Hello all.

Slackware 9.0
kernel 2.4.20
iptables 1.2.7a

iptables -t nat -A OUTPUT -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2
iptables: Invalid argument

From iptables manual:
   DNAT
       This  target  is  only valid in the nat table, in the PREROUTING and
OUTPUT chains,
       and user-defined chains which are only called from those chains.  It
specifies that
       the destination address of the packet should be modified (and all
future packets in
       this connection will also be mangled), and rules should cease being
examined.   It
       takes one type of option:

       --to-destination ipaddr[-ipaddr][:port-port]
              which can specify a single new destination IP address, an
inclusive range of
              IP addresses, and optionally, a port range (which is only
valid if the  rule
              also  specifies  -p tcp or -p udp).  If no port range is
specified, then the
              destination port will never be modified.



anybody can help me ??



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iptables -t nat -A OUTPUT - j DNAT
  2003-05-23 14:41 iptables -t nat -A OUTPUT - j DNAT Leszek Żur
@ 2003-05-23 15:05 ` Cedric Blancher
  0 siblings, 0 replies; 3+ messages in thread
From: Cedric Blancher @ 2003-05-23 15:05 UTC (permalink / raw)
  To: Leszek Żur; +Cc: netfilter

Le ven 23/05/2003 à 16:41, Leszek Żur a écrit :
> Slackware 9.0
> kernel 2.4.20
> iptables 1.2.7a
> iptables -t nat -A OUTPUT -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2
> iptables: Invalid argument

Strange, works fine for me :

cbr@elendil:~$ sudo iptables --version
iptables v1.2.7a
cbr@elendil:~$ sudo iptables -t nat -A OUTPUT -d 1.1.1.1 -j DNAT
	--to-destination 2.2.2.2
cbr@elendil:~$ sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
 
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
 
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DNAT       all  --  anywhere             1.1.1.1            to:2.2.2.2

Are both kernel and iptables Slackware packages ? Are they built from
sources ? If so, does patch-o-matic have been applied (pending and
submitted) ?

I got problems like this when I was used to build my own kernel and use
an iptables package from distro.

-- 
Cédric Blancher  <blancher@cartel-securite.fr>
IT systems and networks security - Cartel Sécurité
Phone : +33 (0)1 44 06 97 87 - Fax: +33 (0)1 44 06 97 99
PGP KeyID:157E98EE  FingerPrint:FA62226DA9E72FA8AECAA240008B480E157E98EE


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: iptables -t nat -A OUTPUT - j DNAT
@ 2003-05-24  1:53 George Vieira
  0 siblings, 0 replies; 3+ messages in thread
From: George Vieira @ 2003-05-24  1:53 UTC (permalink / raw)
  To: Leszek Zur, netfilter

this usually means you did not compile the patch-o-matic patch to fix the OUTPUT bug. Can you check this and make sure it's done as it's not default (for some weird resason)..

-----Original Message-----
From: Leszek Zur [mailto:lzur@record.com.pl]
Sent: Saturday, May 24, 2003 12:41 AM
To: netfilter@lists.netfilter.org
Subject: iptables -t nat -A OUTPUT - j DNAT 


Hello all.

Slackware 9.0
kernel 2.4.20
iptables 1.2.7a

iptables -t nat -A OUTPUT -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2
iptables: Invalid argument

From iptables manual:
   DNAT
       This  target  is  only valid in the nat table, in the PREROUTING and
OUTPUT chains,
       and user-defined chains which are only called from those chains.  It
specifies that
       the destination address of the packet should be modified (and all
future packets in
       this connection will also be mangled), and rules should cease being
examined.   It
       takes one type of option:

       --to-destination ipaddr[-ipaddr][:port-port]
              which can specify a single new destination IP address, an
inclusive range of
              IP addresses, and optionally, a port range (which is only
valid if the  rule
              also  specifies  -p tcp or -p udp).  If no port range is
specified, then the
              destination port will never be modified.



anybody can help me ??




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-24  1:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-23 14:41 iptables -t nat -A OUTPUT - j DNAT Leszek Żur
2003-05-23 15:05 ` Cedric Blancher
  -- strict thread matches above, loose matches on Subject: below --
2003-05-24  1:53 George Vieira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox