From: Alistair Tonner <Alistair@nerdnet.ca>
To: netfilter_user <netfilter_user@o2.pl>, SaVaGE <pc-secure@home.nl>
Cc: netfilter@lists.netfilter.org
Subject: Re: Re[2]: PREROUTING
Date: Tue, 29 Apr 2003 10:49:38 -0400 [thread overview]
Message-ID: <200304291049.38735.Alistair@nerdnet.ca> (raw)
In-Reply-To: <50633741.20030429145355@o2.pl>
On April 29, 2003 08:53 am, netfilter_user wrote:
> Hello SaVaGE,
>
> Tuesday, April 29, 2003, 9:49:10 AM, you wrote:
>
> S> Op dinsdag 29 april 2003 09:23, schreef netfilter_user:
> >> Hello everyone,
> >>
> >> this is my problem:
> >> My LAN is connected to Internet via Linux machine with 2 interface (
> >> ppp0 - for internet and eth1 for local net). I need to connect from
> >> local host, service that is running on port 23073 and 23083 UDP in
> >> internet. For this i wrote afew rules with PREROUTING but when I start
> >> script with rules below i receive:
> >>
> >> Bad argument `PREROUTING'
> >> Try `iptables -h' or 'iptables --help' for more information.
> >> Bad argument `PREROUTING'
> >> Try `iptables -h' or 'iptables --help' for more information.
> >>
> >>
> >> iptables -t nat -A PREROUTING -p udp -d 80.50.60.185 --dport 23073 -j
> >> DNAT --to-destination 192.168.1.2 iptables -t nat -A PREROUTING -p udp
> >> -d 80.50.60.185 --dport 23083 -j DNAT --to-destination 192.168.1.2
> >>
> >> iptables -A FORWARD -p udp -d 192.168.1.2 --dport 23073 -j ACCEPT
> >> iptables -A FORWARD -p udp -d 192.168.1.2 --dport 23083 -j ACCEPT
> >>
> >> What maybe a reason of this msg?
> >> Im using slackware 8.1 with iptables 1.2.6a
>
> S> This behaviour is correct NATting is done on the POSTROUTING table !!!!
>
>
> S> Pascal (PC-Secure Dutch security service)
>
> ammm....im afraid its not correct because I have received msg like this:
>
> Bad argument `PREROUTING'
> Try `iptables -h' or 'iptables --help' for more information.
> Bad argument `PREROUTING'
> Try `iptables -h' or 'iptables --help' for more information.
>
> ...its not correct in my newbe opinion.
Actually DNAT is acceptable in the PREROUTING chain.
change the --to-destination option to
--to ip.ad.dr.ess:portnum
or
--to ip.ad.dre.ss
--
Alistair Tonner
nerdnet.ca
Senior Systems Analyst - RSS
Any sufficiently advanced technology will have the appearance of magic.
Lets get magical!
next prev parent reply other threads:[~2003-04-29 14:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-29 7:23 PREROUTING netfilter_user
2003-04-29 7:49 ` PREROUTING SaVaGE
2003-04-29 9:21 ` PREROUTING Frederic Gobin
2003-04-29 13:28 ` PREROUTING Eric Poulin
2003-04-29 12:53 ` Re[2]: PREROUTING netfilter_user
2003-04-29 13:33 ` SaVaGE
2003-04-29 14:49 ` Alistair Tonner [this message]
2003-04-29 15:59 ` Re[4]: PREROUTING netfilter_user
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=200304291049.38735.Alistair@nerdnet.ca \
--to=alistair@nerdnet.ca \
--cc=netfilter@lists.netfilter.org \
--cc=netfilter_user@o2.pl \
--cc=pc-secure@home.nl \
/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