From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: IPtables FORWARD syntax question/error
Date: Sat, 10 Jul 2004 09:40:49 +0100 [thread overview]
Message-ID: <200407100940.50171.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <40EEC3F6.7050306@mail.co.gilchrist.fl.us>
On Friday 09 July 2004 5:12 pm, Eric Ellis wrote:
> I have a webcache/external proxy on the network that I want to route all
> web traffic from Squid to. I assumed the following to work:
>
> iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination
> xx.xx.xx.xx:8080
>
> the thing is that it gives me the error "invalid argument". Here's what
> else I've tried, with errors:
>
> root@firewall:/etc# iptables -t nat -A POSTROUTING -p tcp --dport 80 -j
> DNAT --to-destination xx.xx.xx.xx:8080
> iptables: Invalid argument
DNAT is not valid in the POSTROUTING chain, only PREROUTING and OUTPUT.
> root@firewall:/etc# iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT
> --to-destination xx.xx.xx.xx:8080
> iptables: Invalid argument
That looks like a valid rule to me (but see below).
> root@firewall:/etc# iptables -A OUTPUT -p tcp --dport 80 -j DNAT
> --to-destination xx.xx.xx.xx:8080
> iptables: Invalid argument
DNAT is not valid in the (default) filter table, only in the nat table.
> root@firewall:/etc# iptables -A OUTPUT -p tcp --dport 80 -j DNAT
> --to-destination xx.xx.xx.xx
> iptables: Invalid argument
DNAT is not valid in the (default) filter table, only in the nat table.
> The troubling thing that I'm having here is that I don't know what about
> the rule that I'm requesting to set up is borked, and I can't really
> find any material on it in the past few days that I've been looking. It
> *appears* to be a valid rule, according to what I've read at
> http://iptables-tutorial.frozentux.net/ and other various
> documentation/HOW-TOs/newb help references. I think I'm missing
> something *really* obvious, but I don't have the depth to find it.
I think your netfilter rule is fine, but I suspect you don't have OUTPUT DNAT
enabled in the kernel - i's a separate option from the normal NAT stuff,
which you have to select if you need it.
Regards,
Antony.
--
I own three Windows books, published by O'Reilly. They are "Windows
Annoyances", "Office 97 Annoyances" and "Windows 98 Annoyances". That
pretty much sums it up for me.
Please reply to the list;
please don't CC me.
next prev parent reply other threads:[~2004-07-10 8:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-09 16:12 IPtables FORWARD syntax question/error Eric Ellis
2004-07-10 8:40 ` Antony Stone [this message]
2004-07-11 2:21 ` Alistair Tonner
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=200407100940.50171.Antony@Soft-Solutions.co.uk \
--to=antony@soft-solutions.co.uk \
--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.