From: Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>
To: Angel Motta <angelmotta@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Rules PREROUTING doesn't work
Date: Wed, 17 Mar 2010 07:21:06 +0100 [thread overview]
Message-ID: <4BA074D2.9090600@unipex.it> (raw)
In-Reply-To: <1c1b5a0f1003162027s73fe4756yefd48b436375b04b@mail.gmail.com>
Angel Motta wrote:
> Hi List
Hi,
> This is my first time the I write to this list. I have a problem case
> with rules PREROUTING.
> I am creating a rule PREROUTING from a range of port which request
> openvpn client and the problem is that when I apply this rules and
> only rules NATs are runing (PREROUTING and POSTROUTING the output of
> #> iptables -L is blank) the clients openvpn still conect to the
> Firewall and not to the SERVERVPN, all requests are processed for
> firewall.
>
> this is the rule:
> $IPT -t nat -A PREROUTING -i $IF_EXT -d $TESTVPN -p udp --dport
> 5000:6000 -j DNAT --to-destination $IP_DMZ_SERVERVPN
>
You miss to report some same informations: $TESTVPN, $IP_DMZ_SERVERVPN
and $FW_IP at least how (netmask, etc...) and if a client can "ping"
(for trying if routing works) the $TESTVPN server
However, try to think: how you kernel can know where the openvpn packets
will routed inside PREROUTING table if it can't route? It couldn't. So
that rules will never match. Try to remove -d $TESTVPN and retry.
And after, then you debug, tcpdump -nvi $IF_EXT (and all the other
ifaces) is your big big friend. Of course the -j LOG is too.
Michele
next prev parent reply other threads:[~2010-03-17 6:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 3:27 Rules PREROUTING doesn't work Angel Motta
2010-03-17 6:21 ` Michele Petrazzo - Unipex [this message]
2010-03-17 13:14 ` Robert Nichols
2010-03-17 13:20 ` Jan Engelhardt
2010-03-17 15:20 ` Angel Motta
2010-03-17 20:25 ` Richard Horton
2010-03-18 0:20 ` Robert Nichols
2010-03-18 1:14 ` Jan Engelhardt
2010-03-18 4:48 ` Robert Nichols
2010-03-18 5:53 ` Angel Motta
2010-03-18 11:15 ` Mart Frauenlob
2010-03-18 15:36 ` Angel Motta
[not found] ` <1268931387.3763.31.camel@casper.meteor.dp.ua>
2010-03-19 5:11 ` Angel Motta
2010-03-19 8:01 ` Mart Frauenlob
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=4BA074D2.9090600@unipex.it \
--to=michele.petrazzo@unipex.it \
--cc=angelmotta@gmail.com \
--cc=netfilter@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).